Today I got my new rails 4 book, crafting rails 4 applications. I am excited about this book, because it is one of the most advanced rails books that exist right now. OK, maybe books regarding web are getting old too fast so it is preferable to choose other sources to learn, but with this book, I feel something is different.
First of all, it is about creating "Rails plugins", known also as rails engines. Engines were one of the most controversial things in rails, since in the beginning nobody knew if it should be a part of ruby on rails. Many developers opposed to the idea of them because it increased the complexity back then. I still remember my first attempts when I was hacking around in rails 2.2 with a rails engine named substruct. It was a rails eshop engine and it was really early days for something so brilliant, just imagine that rails didn't have assets, bundler and all that cool stuff that now has.
Today engines are something totally different in execution comparing to the dinosaur age (it was about five (5!) years ago) and now it is the preferred way to create modular pieces of code. It has changed quite a bit and I hope this book will be the flagship for learning about them.Right now and before this book, the best way to learn about rails engines is:
- The rails guide, even though it doesn't have many advanced examples
- Railscast which was also pretty basic just to get an idea
- Rails in action book, even though it is for rails 3 mainly and there is only one chapter dedicated to rails engines. Ryan Bigg is the author of another great book for rails engines, multitenancy in rails.
- Some blog posts in the wild web which is the best try for something more advanced with explanation
- Dig into rails engines source code, search github famous engines like devise, rails admin etc.
- Cool presentations by successful companies and how they have implemented SOA
I have already scheduled to read it, practice with it's code and write in this blog about my exploration. But what makes it so special and why am I so excited? The author of course! José Valim is one of the top contributors in rails, he works for Plataformatec, the company that built devise, the de-facto rails engine for creating a fully flexible authentication solution. I believe that this book is the best way to learn rails engines right now. If you are an advanced rails developer who wants to dig into the rails engines world, do yourself a favor and buy this book.