Rails 3 in Action |
Author: Ryan Bigg & Yehuda Katz Aims to introduce web developers to the Rails platform. Does it succeed? Developing for the web is a trendy as well as a substantial subject, and choosing the right web framework has become a very difficult task, with a lot of available alternatives. For example, you face a choice between PHP Zend, Symfony, Perl Mojolicious, Dancer, Ruby on Rails and much more. The problem is, that it not only matters whether one framework is more flexible or has more advanced features than its competitor, but the decision also depends from whether there is accessible documentation and easy-to-understand guides on how to use the framwork and leverage its functionality. This book tries to smoothly introduce devs, ideally with prior Ruby experience, to the Rails platform and fill the information gap. It follows an example-driven approach, hence the reader gets to learn by following the building of the example application from start to finish, a process that spans most chapters of the book.
The authors do not waste time with theory, but get straight to the point within the first few pages. So Chapter 1 starts off with the scaffold, a component that sets up the structure and boilerplate code of a Rails project. However, scaffolding does much more than that; it also sets up the underlying MVC architecture!. So literally within minutes and virtually no code you can set up a bare bones Restful-enabled MVC project, a process demonstrated by means of initiating the example Purchase app. It is this ease of setup that certainly has contributed to Rails popularity. Then, when you expect the next chapter to build on the previous one and dive into more advanced features as well as look into coding the application, the Ruby train is stopped on its rails and instead takes a detour into the Unit testing and Test Driven Developmen station! It is a very refreshing approach to see a book promoting the introduction of TDD so early in the project’s lifecycle, and quite rightly, as the times of “Build first, test later” belong to the past. It uses an alternative form of TDD called BDD, which acts as the common language denominator between clients and developers for communicating the testing requirements back and forth Chapters 3 through 5 build on the concepts learned from the previous chapters and fuse those with use case scenarios, configuration, Restful routing and validation - everything needed for setting up a full blown real world CRUD application. They also introduce another very important concept that should also be included early in a project’s development cycle; that of version control, using what else other than Git ? The next three chapters are devoted to authorization and authentication then Chapters 9 to 12 complete the application started all the way back in Chapter 3, tackling,amongst others things, file uploading, tracking state and sending email. Chapter 13 details the process of exposing an API (something like the Amazon Web Services or the Tweeter API ) thus your app can be programmatically used, which will give people one more reason to prefer your service. Chapter 14 finally looks into deploying the finished product while the next one looks into extending it to give the user the ability to log in using a centralized authentication system - Oath, equivalent to Google’s OpenId - which allows signing in into your app by login in with your twitter account, The final chapters go through tweaking and adding more advanced functionality. Chapter 16 covers tuning the app’s performance by examining areas that can cause potential bottlenecks which not only pertain to Rails but touch all web based applications, like pagination, caching and database performance. Chapter 17: Engines is another example of Rails out-of-the-box functionality exposed as Gems (libraries) but they, newly introduced in Rails3, have the property of spanning the boundary of a single application allowing functionality to be shared across applications. Chapter 18 ends the book with a very advanced subject, that of Rack-based applications Overall, the book lives up to its "In Action" title. There is a lot of action as it tries to cover everything with the danger of being overwhelming which sometimes makes you wonder to which target group it applies to: beginner, intermediate or experienced ? A good approach would be to read the early chapters, apply what you’ve learned, get experience and after that go back and read the more advanced stuff On the other hand, it is a thorough guide which covers everything from setting up to deploying an industrial strength real world application, going from A-Z , while the language and style adopted , which I would describe as “sitting next to your colleague who walks you through the application”, makes it easy to follow and very accessible. As a complete guide, which caters for everything that a Rails developer will need, it also helps to allay the widespread concern that, Rails 3 has grown out of proportion and became unmanaged, as suggested in this blog post. Guides like this one can steer developers in their choice of a given framework and cut the Gordian Knot of making that crucial decision. If you are heading in the direction of Ruby on Rails, this is a recommended book.
|
|||
Last Updated ( Monday, 23 January 2012 ) |