In today’s class, we learned about Controllers, the C in an M-V-C application model. In short, Controllers are like traffic cops. They take requests from a user and then work with the Model and View to bring information back to the user.
We also learned about “associations” or how to make separate database tables relate to each other. For example, if you’re making a contacts application, you’d probably want a People table to relate to an Addresses table. Dealing with tables and associations were traditionally a huge pain in technologies like PHP, but Rails makes it so easy.
In my previous diaries, I focused a lot on the class rather than the content. Today, I’ll spend a little more time talking about Rails itself.
The beauty of Ruby on Rails is its conciseness. It’s as if Rails read The Elements of Style as a pimply teenager in high school and took it to heart while growing up. The resulting D-R-Y philosophy is so apparent in Rails, I found myself asking, “Really? That’s all I have to type?” The answer was, “Yes!”. I even heard a classmate say, “In Java, this would have taken ten times more code to write.” For lazy and dumb programmers like me, this is awesome.
The best part of learning Rails is making applications that do real things. After years of faking things in Photoshop and Illustrator, it’s so much fun to make something work in a short period of time. I just feel like I’m really creating, not just imagining. It’s also great to gain insight into how web applications are put together. It’s like getting to look under the hood of a BMW, and knowing how all the parts fit together and why.
What doesn’t work
Lack of good documentation for beginners and designers
Sarah recommends Agile Web Development with Rails and Rails Pocket Reference as resources for more on Rails, but admits she hasn’t found a good guide for absolute beginners yet. (Open-sourced software is notorious for poor documentation.) I suppose you’ll have to take her bootcamp class.
Yellow Cab fiasco
Two students had to wait two hours for a cab to get to class. What is up with taxicabs in San Francisco!?
The bottom line
Rails is fun to learn and to use. For designers who are serious about designing for the web, a class like this is a must. Even if it’s just to know how applications are built.