A few days ago, @altnethispano invited to participate in a VAN about Ruby on Rails, as a result from that VAN, they awarded me with a copy of Rails3 in Action from Manning, currently being written -given it’s part of their MEAP program- by Yehuda Katz and Ryan A. Bigg.
The following is a review of the first 10 chapters out of a total of 23, because the book has not been completed yet.
The book’s goal is to demonstrate how to develop an app in Ruby on Rails 3, as the book authors put it, “a real-world application and not your typical blog application”, and for the first 10 chapters they provide the basics of going through this process.
First, the authors provide us with their vision as to why use Ruby on Rails for application development and the overall benefits to employ tested patterns and recipes in a development team.
Next, in order to introduce the reader to Ruby on Rails the authors demonstrate how to create a simple app in merely minutes, but special care is given to explain what Ruby on Rails generators have done in order to get an app prototype in such short time.
A cornerstone in Ruby on Rails world is the use of TDD - Test Driven Development - or BDD - Behavior Driven Development - to achieve proper application development and the authors dedicate a whole chapter to explain why this is the correct path to follow when developing real applications in Rails, also to explain the inner-workings of TestUnit, RSpec and Cucumber, being the last two, the tools of choice to develop the tutorial application for this book.
The tutorial application is called “Ticketee”, which has the purpose to manage support tickets for different projects, one of its objectives is to become a SaaS application - Software as a Service -.
Development is carried through BDD, showing in every step how to integrate key features of Rails 3 and how to provide standard functionalities from most modern web apps.
The process guides us through:
- Proper useof RSpec and Cucumber to design and test our application
- Implement authentification and authorization
- Attach files
- Tracking process state through finite automats
- Implement tagging
The rest of the book specifies the addition of features like:
- Automatic email sending
- Configure our application as SaaS
- Provide an API in order to allow third-party developers to interact with our application
- Effectively deploy our final application
- Authentification alternatives - this may involve signing in through providers like common social networks -
- Cache settings to achieve better performance
- How to delay jobs
- Implement i18n in our application
As a bonus, the books promises a series of advanced topics that will allow us to write tools for Ruby on Rails.
The book is full of examples and guide us completely, never assuming that we already know how to do or implement the required actions or steps, also, on every action provides a full description of what it does the first time it is introduced in the text.
Book language is natural and relaxed, and as commented above, takes us as real as possible through the process of developing an application. In doing so, it references and shows us how to use specific non-base Rails gems that will help us in achieving the goal.
The main difference between this and other Rails programming books I’ve read, is the approach to correctly develop an application enforcing the use of BDD and TDD over the typical scaffold generation.
I do not consider this to be an overly technical book to learn about the inner workings of Rails, neither is a fundamentalist book about BDD and/or TDD, but definitively is a book to those beginning or with basic knowledge about Ruby on Rails.