This is the complete text of Objects on Rails, a “developer’s notebook” documenting some guidelines, techniques, and ideas for applying classic object-oriented thought to Ruby on Rails applications. This book is aimed at the working Rails developer who is looking to grow and evolve Rails projects while keeping them flexible, maintainable, and robust. The focus is on pragmatic solutions which tread a “middle way” between the expedience of the Rails “golden path”, and rigid OO purity.
As Avdi also points out in the book, it is important not to think of it as a "best practices" book. It's more of an exploration, a journey away from way most people build Rails apps to discover which alternative techniques work and which don't.
Some of these experiments end with the realization that the effort needed to introduce flexibility was simply too great to make the technique worthwhile. In my opinion, this is a good thing! Without these experiments, it would be left to the reader's imagination how much decoupling would be "too much". I really like that Avdi goes a little over the edge and then explains why he probably wouldn't do that in a similarly sized real project.
The summary of the book is a list of scenarios, each with links back to the places in the main text where it is described how to deal with it.
For further reading, Appendix A is comprehensive list of resources (books, blog posts etc.). Lots of interesting things to dive into in this list.
Finally, Avdi is a great writer. I also enjoyed his "Exceptional Ruby", and I really hope to see more books from him in the future.
A book full of good ideas. A bit short though and in parts a bit off (the overengineered tagging part). The book is more an eyeopener for developers only familiar with rails standard way of doing things, than a reference or a pattern catalogue.
Clear and well-written exploration of techniques that can be used in rails applications that can help with testability, separation of concerns, reducing coupling, and overall clean design. In reality each of those list items is interconnected, as Avdi succeeds in demonstrating.
Examples of some of the interesting parts was the idea of Exhibitors, factory methods using public_method, default arguments as a sort of dependency-injection mechanism, and bunches more. I definitely wish more rails programmers subscribed to similar perspectives, and I can see myself using some of these techniques in future projects.
A couple of cool tricks in here. I think the choice of writing a blog application was an unfortunate one though. It gives a muddy perspective of the techniques shown, which left me with a feeling that it's all just a systemized premature optimization. A couple of disconnected, small, examples would have made this book much better imho.
A pretty good introduction to proper domain design and architecture, but a bit rudimentary when it comes to extracting and referring to patterns. I started this years ago, but only recently finished it, and I credit it with first getting my mind moving in this direction. Now, I'd hand it off to an intermediate dev looking to transition to a senior.
Good read. Code examples sometimes look over-engineered and are difficult to follow but the reasoning behind them is really well described. The book contains great summary section which acts as a good reference.
I had to come back to this a second time late last year. I feel it's not for rails newbies. You need to make the mistakes before diving into this one. Grimm shows the bad examples and ways how to improve upon them.