This week I was at YAPC::NA in Austin, Tx. While there I took the time to get some reading done. The first book I read was Everyday Rails Testing with RSpec by Aaron Summer. This was an excellent book on how to think about testing in rails. The mix of RSpec, factory_girl, capybara, and other gems serve as a good base for tackling most testing issues.
The other book I read, Objects On Rails by Avid Grimm, was the one that made me rethink many things on how to write apps in rails. The simple idea of starting with plain ruby objects to model the problem domain was an eye opener. I have toyed with web development in common lisp and one of the aspects I liked was I could start with simple lisp lists to persist objects at the start instead of jumping right in to a database.
I knew the decorator pattern but the only real example I had of one was java’s decorator pattern for IO and because of that I avoided it. But Avid’s use to decorate a model for the view was beautiful. I plan to explore this pattern more.
There was so much information in the book that I can’t explain here. I plan to re-read the book to get a better understanding of the ideas and the techniques. I also want to do a talk at my local ruby group so I need to build an example rails app that uses the ideas from the book. Avid uses a blog as an example. I think I want to do an online election system. Anyway, great book. I recommend to anyone studying rails or object oriented design.