AWDWR 5.1 - 03-05 - Theory

Chapters 3 through 5 focus on a little bit of theory before we get to building the tutorial application. Chapter 3 - The Architecture of Rails Applications Chapter 3 jumps into explaining MVC. It’s a pretty simple concept. MVC stands for Model, View, and Controller. The model is responsible for the state of the application, often the data you store in a database. It’s also more than data; it enforces the business rules that apply to your data. The model is both a gatekeeper and a data store. The view is responsible for generating some type of user interface. The view’s job is done once the data is displayed. Multiple possible views of the same data are a common case. The controller orechestrates the application. Controllers receive events from the outside world, interact with the model, and display the appropriate view. The book provides a simple diagram: ...

June 5, 2017 · 5 min · 1044 words · Lewis Cawthorne

Misc Reading

I’m still going back to finish my Agile Web Development with Rails 5.1 series. I finished reading the main project in the book a while back now. I just haven’t made time with the computer to create the demo project, and I want to have it in a repo to upload and talk about the code a little. I didn’t read the reference chapters, since they were still incomplete. I think I’ll read Agile Web Development with Rails 5 on Safari Books in its entirety, and that will give me a good perspective to see what changes with the project in the Rails 5.1 version of the book. The only thing that I noticed so far that was 5.1 specific is the ActionCable Websocket stuff they throw in, so that if a price changes on the backend it pushes the update to customers. Pretty neat to see Websockets used for something so small, instead of big examples of chat servers and what not like you commonly see. ...

June 2, 2017 · 4 min · 740 words · Lewis Cawthorne

AWDWR 5.1 - 02 - Instant Gratification

First I’ld like to say sorry the images are a little big. Not used to screencaps on this retina Macbook. So, I fixed my mistake from last time. I had originally installed ruby via homebrew, but now that I’ve read up on rbenv, it seems a lot nicer than the old rvm, and I might want multiple versions of Ruby on my home PC. So I uninstalled Ruby 2.4 and went with brew install rbenv and then used it to install the latest Ruby. I see why the book authors prefer it over RVM now. It’s a lot less invasive than the old RVM. ...

May 18, 2017 · 6 min · 1148 words · Lewis Cawthorne

AWDWR 5.1 - 01 - Introduction

So, what do I have to blog about? I’m always trying out new stuff and reading books, so I figure I’ll talk about that. I happen to have just gotten a beta copy of Agile Web Development with Rails 5.1 and since my Ruby and Rails experience from my résumé is a little rusty, I figure I’ll read that and blog about the experience. Starting this site using Jekyll has made me think about Ruby lately anyway. It’s been many years since I’ve read “Agile Web Development with Rails”, and I think it was the version that covered Rails 1.2, so this should be a pretty new experience for me; both a great refresher and an introduction to what is new in the Rails world these days. ...

May 16, 2017 · 8 min · 1570 words · Lewis Cawthorne