Book Review: Crafting Rails 4 Applications
One of my goals for 2014 is to read more programming books. Since I am starting work on a Rails 4 application, Crafting Rails 4 Applications seemed like a good fit since it’s aimed at experienced Rails developers.
Here is the official book description:
Get ready to see Rails as you’ve never seen it before. Learn how to extend the framework, change its behavior, and replace whole components to bend it to your will. Eight different test-driven tutorials will help you understand Rails’ inner workings and prepare you to tackle complicated projects with solutions that are well-tested, modular, and easy to maintain.
It’s a pretty short read (it took me less than 2 weeks of reading on the subway) and is very code-heavy. I know the most common complaint about programming books is a lack of code examples, but you definitely wouldn’t say that about this book. Every chapter is bursting with code examples. (In fact, the code examples can be a bit overwhelming.)
The book deals mainly with Rails plugins (meaning Railties and Rails Engines) to solve different problems. Many of the chapters deal with interesting problems, eg. how would you configure Rails to respond to a .csv format and return a CSV file? Some are a bit more convoluted, eg. how do you build a plugin that allows you to store i18n translations in the database?
I really find it difficult to rate this book since it’s probably the first book I’ve read that is aimed solely at experienced developers – so I didn’t really know what to expect. Overall I think I’m a bit underwhelmed – the author definitely has an excellent understanding of Rails and does a decent job to break down and simplify the different concepts, but some of it moves a bit quickly and try to cover too much of the Rails infrastructure in one go.
At the end of the day probably wouldn’t be using any of the concepts covered in the book, simply because of the complexity it introduces. If you want to generate a simple CSV file are you going to add a simple endpoint that just streams the file, or are you going to write a custom renderer? Where the examples in the book does make sense is if you are writing your own plugins or gems – the insight into the Rails infrastructure is definitely useful.
Crafting Rails 4 Applications is available for $30 (at the time of writing) on Amazon.
Happy coding.