Skip to main content

skip to main content

developerWorks  >  Rational  >

Book review: Agile Web Development with Rails

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Introductory

Darren Torpey, Student, Worcester Polytechnic Institute

15 Dec 2005

from The Rational Edge: Web development can benefit from the application of agile development principles, claim the authors of a new book that also advocates the use of Rails, a new Web development framework based on the Ruby language. This review describes how the book effectively presents both practical advice and theory, noting various pedagogical devices that the authors employ to deepen readers’ understanding of Rails and the rationale behind agile development approaches.

book coverby Dave Thomas, David Hansson, Leon Breedt, Mike Clark, Thomas Fuchs, Andrea Schwarz
Pragmatic Bookshelf, 2005
ISBN: 097669400X
Cover price: US$34.95
450 pages

Does developing a high-quality, dynamic, interactive Web site have to involve dozens of developers and thousands of lines of code? What if you had a powerful, high-level language that looked and felt much like English and a Web development framework that could help you create an interactive system in a matter of minutes? Could you then develop a Web site using an agile development approach?

If these questions intrigue you, then you will want to read Agile Web Development with Rails -- and the effort will be well worth your while. The book provides a great starting point for realizing agile Web development in a big way.

Rails, also known as Ruby on Rails, is a Web development framework based upon the relatively new, up-and-coming Ruby language. Its creator is one of this book's authors, David Hansson. As the title suggests, the book's goal is to show readers how to use Rails to accelerate and facilitate high-quality Web site development, using an agile process.

Tutorials walk through Web site creation

The first two sections contain two tutorials to acquaint you with Rails and introduce its potential for Web site development. The first, a very short "Hello World" type of exercise, ensures that you have a working base for Rails.

The second tutorial then takes you step-by-step through the end-to-end creation of a Web retail store named Depot. At the end, you have a full, working system. You also have code that is so easy to read and so well exemplifies the aspects and features of Rails that it can serve as a great quick reference for future projects.

There are a few notable techniques the authors use to help you follow along with the tutorial. First, they make good use of images to show you what the resulting Web pages should look like as you go along. For highly sensitive and potentially confusing tasks such as editing a few select lines in a configuration file, they provide crystal clear images that show the "before" and "after" states of the configuration file, highlighting changed fields in the latter. If you're still not sure what the exact code amounts to, you can easily download the actual code base from the book's corresponding Web site.

Another useful aid is the brief reviews the authors provide, both at the ends of chapters and at key points during long, involved tutorial steps. These reviews help demonstrate good overall thinking about design. They also help you stay on track and understand the authors' pedagogical rationale for ordering the content.

Other effective pedagogical techniques

True to its title, the book strongly emphasizes agile development techniques throughout, especially in the main tutorial. As they guide you through the creation of Depot, the authors explain the (hypothetical) context of each system change or addition, which always results from conferring with the end customer. Depot's development process is iterative; each iteration begins with showing the current product to the customer and ends with the implementation of some small but tangible, discrete portion of functionality, based upon customer feedback.

To highlight important practical advice, the authors use an effective technique: "David Says" boxes that float throughout the text and pose questions that someone like David Hansson, as a developer, might ask about the current topic. For example, when a design decision in Rails might seem questionable to the uninitiated, David will explain the rationale behind it and how you can use it to your advantage. At times, the authors use these boxes to present the viewpoint of a simulated client or other stakeholder watching you work through your development process. This imaginary outsider has a bottom-line mentality, similar to the one that most clients and other stakeholders will have of your product. Pollice et al. used a similar imaginary client effectively in their book, Software Development for Small Teams: A RUP-Centric Approach.

Occasionally, the authors point out common misinterpretations of design ideas and misuses of Rails features, and then show and justify better alternatives. Such observations reflect the authors' awareness and wisdom about how easy it is to misunderstand many Web development paradigms and technologies. This same awareness underlies the design of Rails and may well play a big part in its successful dissemination and use across the Web. The book also includes tips such as "put all destructive actions behind a POST request," which provide definite, concrete value; the authors never resort to a thoughtless process walk-through or a brainless series of technology specifications.

Readers need have very little familiarity with Ruby to follow and understand Rails as it is presented in this book. Any time they bring up a new Ruby language concept, the authors supply a page number in the margin, so you can easily look for more explanation in the book's Ruby language appendix. Similarly, whenever they mention a new Rails term for the first time, they repeat the term in the right margin, so it's easy to go back and look up the term if you breezed past it in your first reading.

The book employs a healthy dose of humor throughout, often to compare traditional and agile approaches. For example, in discussing how much page design to do and when, the second tutorial humorously points out that practical programmers should know when to put the HTML editor down and let their artistic side (or a real designer) take over. At times, the authors also use humor to sugar-coat messages about avoiding common pitfalls of Web development and learning how to work collaboratively with others.

As you might expect from any book about Web technology, these authors use proper XHTML and Cascading Style Sheets (CSS) in the book's examples, and they employ important standards, such as International Date Format. Their use of syntax is clean, and they also introduce and explain it in a way that justifies its use in the first place. This is really helpful, because many people have difficulty understanding why certain technologies use certain syntaxes.

The how and the why

It is no small task to teach someone both how to use a new technology and why they should use it. Agile Web Development with Rails takes on this challenge and triumphs by presenting both practical information -- a hands-on approach to learning Rails -- and the theoretical underpinnings of agile development. Although the book could easily serve as a good starting point for newcomers to Web development, I don't think that was the authors' intent. Rather, the book seems pitched to those who understand the problems inherent in monolithic Web technology development and long for a good alternative. For those ready to embrace agile Web development, Rails offers both a programming language and an application framework developed with sound, consistent, essential concepts in mind -- and this book presents them in a clear and useful way.



About the author

Darren Torpey image

Darren Torpey is in his second year of a master's program in computer science at his alma mater, Worcester Polytechnic Institute. He is currently working with Professor Neil Heffernan on a Web-based intelligent tutoring system to help eighth grade students and teachers prepare for the math portion of the Massachusetts Comprehensive Assessment Survey (MCAS). In his spare time, he designs computer games, dabbles in Web technologies, and writes small tools for personal use.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top