Week 4 Day 1 - ASSUMING DIRECT CONTROL

Today's partner: Mark S.

Today was all about Controllers. Well, and ActiveRecord relations and SQL queries… first things first.

The assessment went really well, I believe for most people, but especially for me. I did the practice assessments two (and a half) times, and when I came in this morning asked my neighbors what they had done to practice. One had a really good suggestion—look for foreign keys early on, in the schema.rb file, and then implement the belongs_to relations based on those keys. With this hint, a bit of practice, and a much greater understanding of SQL, I didn't really have any issues with this assessment.

The readings last night were a different story, and I was really worried about how the day would play out. I knew coming in that today was going to be about the C of the MVC paradigm - we've covered models, we'll get to views tomorrow, and we were doing controllers today. But none of the readings we had to do made it clear what, exactly, controllers would consist of. I sort of struggled through, and collapsed into bed.

Well, this morning, it was much more clear. During the lecture, Jonathan and Constance showed us a lot of the same stuff we saw in the readings, but watching it live, it became clear how it was going to fit together. REST combined HTTP verbs with URIs to produce a variety of different responses… which are handled by the routes handles in routes.rb and the controllers generated by rails.

There's not a lot to say about the controllers themselves—you define them in a predictable way, they have actions defined in an easily readable way, and you write those actions in pretty predictable ways.

Ultimately, because rails is actually pretty sane, learning more about controllers teachers you a lot about generating, models, and I presume views… in addition to me focus on learning snippets, shortcuts, and so forth, it feels like we're really picking up speed. Or at least I am. But looking forward at the readings, there are certainly a lot, and it's clear that having a repeat of today—hard work, but valuable—will require sticking to the readings and making sure I'm ready for the next day.