Jump to ratings and reviews
Rate this book

Objects on Rails

Rate this book
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.

197 pages, ebook

First published January 1, 2012

17 people are currently reading
228 people want to read

About the author

Avdi Grimm

4 books254 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
52 (31%)
4 stars
82 (50%)
3 stars
27 (16%)
2 stars
1 (<1%)
1 star
1 (<1%)
Displaying 1 - 11 of 11 reviews
Profile Image for Jacob Tjornholm.
35 reviews3 followers
April 13, 2012
I really, really enjoyed this book.

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.
Profile Image for Bjoern Rochel.
398 reviews83 followers
April 10, 2012
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.
Profile Image for Bradley Schaefer.
25 reviews4 followers
November 6, 2012
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.
Profile Image for Christoffer Klang.
31 reviews
Read
June 2, 2014
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.
Profile Image for Rob.
7 reviews5 followers
February 9, 2014
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.
Profile Image for Michał Szajbe.
34 reviews6 followers
December 19, 2012
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.
Profile Image for Chris.
30 reviews2 followers
May 11, 2014
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.
Profile Image for Katherine.
149 reviews
October 13, 2013
Well-written although overkill for a blog! We used some patterns discussed in this book.
Profile Image for Jesse Storimer.
Author 4 books40 followers
July 22, 2013
Really great narrative here. This was the first technical book to hold my attention all the way through in a while.
Profile Image for Orban.
41 reviews
April 15, 2014
By reading it I learned how to decouple my domain logic from Rails. I also learned a very effective way to use presenters.
9 reviews9 followers
Read
April 7, 2014
Great book. A must read for any one working professionally with Rails.
Displaying 1 - 11 of 11 reviews

Can't find what you're looking for?

Get help and learn more about the design.