Author/s : Chad Pytel, Tammer Saleh
Publisher : Addison-Wesley Professional
Category : Other Review by : Katrina Owen
Rating : 9 horseshoes
I have a love affair with this book.
Every section of every chapter has given me practical refactoring advice, and for every section I find myself putting the book down in order to dig into my current project and apply what I'm learning about.
The book covers common errors seen in all aspects of a rails project: models, controllers, views, helpers, services, routes, authentication, using third party libraries, testing, performance, scaling, deploying, and exception handling.
This is not a book for learning how to write rails applications. In fact, I believe it is a book that would be best suited to someone who has actually done at least some rails programming already. It's very useful to have made the mistakes that are covered, to have had to fix bugs, maintain, and extend code that contains these code smells, to have made the choices that lead to the various antipatterns described. Without that pain, I don't think you'll get much in the way of epiphanies.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch.
It's been over a year since I wrote this review, and in the interim I've changed my mind somewhat.
This book definitely does what it says it will: documents common anti-patterns and tells you how to avoid them.
I would probably rate this book a 6 or 7 now, though, because it doesn't talk about one of the largest anti-patterns of them all (in my completely biased opinion), which is thinking of your application entirely within the framework of Rails rather than simply using Rails as a delivery mechanism for your application. Not necessarily because you want to deliver it in other ways, but because the design of your application is more likely to be maintainable and understandable if it isn't all slotted into a rails controller, a rails view, or a rails model.
Rails is an excellent tool. Let me be entirely clear: I love it. I don't use it every day, because it's not always the best tool for the job, but it's a tool that I have an enormous appreciation and great respect for.
If you're working with Rails on a daily basis, this is probably well worth your time.
Your mother is a hamster and your father smells of tiny ads!