blowmage A Mike Moore joint

Book Review: Agile Web Development with Rails

Ruby on Rails is a framework that makes it easier to develop, deploy, and maintain web applications.

Dave Thomas and David Heinemeier Hansson wrote a killer book in "Agile Web Development with Rails". I wish more technical books would be as reader-friendly and enjoyable as this book. While the book isn't a reference book, it isn't a brain-dead newbie overview either. It covers all of the important technical aspects of the Ruby on Rails framework from design to development and from installation to deployment. It also does a great job of explaining the philosophy behind Rails, and why Rails makes the assumptions it does. (Don't worry, it also shows you how to configure Rails to use your assumptions if they are different.) Overall, the book is a first-class introduction to the body and soul of the Rails framework.

The reason I read the book was to really understand the Ruby on Rails framework. I have dabbled with Rails for the last nine months or so, ever since I first read about Curt Hibbs's claim "that that you could develop a web application at least ten times faster with Rails than you could with a typical Java framework". Rails seems simple enough when you first approach it, but there is surprising depth once you scratch the surface. So like most things I don't fully understand right away, I decided to find some books on the subject. This book was so good I'm not sure if I'll need any others.

Rails is a new framework for building web applications using the Model-View-Controller pattern, similar to most Java-based web apps. Unlike Java web apps which are usually heavy on configuration, Rails follows the philosophy of "don't repeat yourself" and "convention over configuration". This means that Rails is built to improve the time of development. But the promise of Rails to me is beyond making me more productive, once you become familiar with Rails and accept the conventions you will get more done while having more fun in the process.

I think Rails has the potential to be a disruptive technology for web development. As more users become familiar with and expect Web 2.0 functionality web sites will be forced to change in order to deliver the new standard for usability. Web designers and developers will look to new frameworks such as Rails to help them achieve this functionality. Does this mean that Rails will lead the way to a new utopian world where proprietary frameworks like .NET and J2EE are abandoned, PHP is dethroned, and Rails becomes the de-facto standard for modern web development? Probably not, but I do think that Rails does show just how much everyone else will have to evolve or face extinction. To an extent, I think we are already seeing this with Microsoft's embrace of AJAX for the next version of the ASP.NET framework. But for now Rails is here and arguably more fun to use.

The meat of the book is divided into two main sections; an implementation of a simple e-commerce web site and an in-depth look at the various components of Rails. The book has a great layout. The book’s format, links, tips, index, appendixes, etc are all handy when skimming the book, although I found most of the book so compelling I read it cover to cover. (And I actually finished it, unlike most technical books I read.) Based on your experience you could skip one section or the other, but I would suggest not skipping around too much, the authors build on content presented earlier to deliver an engaging narrative that adds perspective and savor to the content. But if you do skip around the page number of the previous content is always listed.

The introductory section does what you would expect; introduces Rails and shows you how to use it. In this section I think the readers are presented with more of the soul of Rails; explaining why things are they way they are and now that helps you. While you don't need to be familiar with the Ruby language, you do need to be familiar with web programming in general. While the authors claim that Rails is inherently Agile, I didn't find the tutorial particularly Agile. I was disappointed that the chapter on testing was separate from the rest of the tutorial. But I found this acceptable because the section was about getting to know Rails, and not about reinforcing the Agile methodology.

The advanced section goes into detail of the body of Rails; explaining each component of Rails and how they work. I found these chapters particularly well written and was thankful for the narrative presentation. It would have been very easy for these chapters to be dry and boring to read. Near the end of this section there are chapters on additional topics such as Web 2.0, scalability, and deployment. I think there are more advanced books that could be written on certain subjects, specifically ActiveRecord, deployment, and scalability. (I only mention scalability because it has been a common criticism against Rails. I think the book did a fair job of explaining the framework's scalability.) Perhaps the Pragmatic Programmer folks could write some Friday books about these subjects?

The success of the book is conveying the spirit of Rails. I think the future looks bright for the Rails framework because the contributors are committed to keeping Rails simple, lightweight, and not overly-complex like most J2EE solutions. I'll be using the lessons learned from the book such as "convention over configuration", "don't repeat yourself", integrated unit testing, and the Rails deployment model while designing a new .NET-based web framework at my work.