I finished the first part of the book and wanted to give a short review.
The book is organized into two main parts. The first part (173 pages) is an introduction followed and a longer tutorial on how a build a rails app.
The second part (280 pages) is an in depth discussion of the various rails packages and discusses themes like AJAX, Action Mailer and deployment and scaling.
This review will focus on the first part.
The first part starts with an overview of the rails architecture and the Model-View-Controller pattern. Then it describes how to install rails on Windows, Linux and Mac OS X and how to setup the whole with databases and rubygems. After a short “Hello rails” application, the biggest part of the first half is devoted to the depot example.
Chapter 5 begins to create the depot application, a online store in rails. This tutorial continues to chapter 12 and give you an overview of the various capabilities of rails.
Chapter 6 discusses how to create the application, create the database and connect to it with rails. The scaffold generator is used to create a product table/model and some validations are shown.
Chapter 7 discusses the a new controller, extends the product model and show how to use views and stylesheets.
Chapter 8 talks about sessions, the flash notices and the relationships between models with belongs_to. The depot application can now display products, store them in a shopping cart and edit the available products.
Chapter 9 shows partials and some tricks with actions to implement a basic shipping function.
Chapter 10 adds authorization and filters to ensure that only logged-in users can add products and access the admin controller. Also application-wide helpers are introduced. After this chapter the power of rails is really apparent. Few lines of code lead to an very impressive application that would take a lot longer to implement for example in PHP.
Chapter 11, the last of the first part, introduces the various tests and benchmarks tools. Unit and functional test and their use of fixtures are shown. Especially the integrated functional tests are an advantage of the rails framework and I enjoyed reading this chapter. It also shows how to develop Test Driven, also this part could be longer.
The first part is more for rails beginners and introduces the main concepts very clearly. After this part, you could start your own rails application, all the important functions, helpers, and tricks are shown.
Although there are many references to Agile Developing, it is rarely more than “in rails we love to talk to our customer often” or “fast feedback is important” and “lets move this function”. I wished that the agile part of the title would play a bigger role. But it is already more than in any other web-application or programming book I read that is not entirely focused on Agile Development or Test Driven Development. Maybe I’m just too biased :-)
Apart from this, the first part is very good written and I recommend it to everybody who wants to have a look at this fancy rails-world. I liked the fact that one example application is used to demonstrate and teach all the basic knowledge. Therefore you can follow its development from scratch and see it growing like your real application would.
UPDATE:
See also the second part of the review.
