Agile Web Development with Rails

This was originally printed in the September 2011 edition of the UKUUG newsletter, which is now defunct.

Title: Agile Web Development with Rails (4th edition – later editions are available)
Authors: Sam Ruby, Dave Thomas, David Heinemeier Hansson
ISBN: 9781934356548

This book, a well-known introductory guide to Ruby on Rails, is now in its fourth edition, so most problems have been shaken out by this point. It is also reasonably up to date, covering Rails 3 which was released a year ago. Assuming it stays around for a simimlar amount of time to the previous version, readers should be able to get at least three years worth of value from this book.

The first chapter covers the installation of Rails on the usual Windows, OS X and Linux platforms. What the guide unfortunately fails to mention is that if you install Rails from a package repository (as I did by default) you will probably find yourself with version 2.x, which will not be compatible with some of the examples and tutorials in the book! Some suggestions of editors are also made, which is useful as not all IDEs will support code completion for Rails.

After installation we have the obligatory ‘Hello World’ chapter, which covers the basic commands such as creating a new project and starting the WEBrick development server. A few basic changes to the example, including the introduction of variables and linking to other pages are covered, and by the end of the chapter the reader has a basic application up and running. A relatively short chapter then follows on the Model View Controller (MVC) pattern, which readers may want to supplement through online resources as the text does not go into much detail.

The next chapter is a basic introduction to Ruby, and a sensible addition given that many people who are new to Rails are also new to Ruby (unlike Catalyst, where a reasonable knowledge of Perl can be assumed). All the basic concepts are covered, and for most readers it will be a case of getting used to the Ruby syntax as opposed to approaching constructs such as loops for the first time. Common Ruby idioms are also discussed, which might otherwise confuse programmers new to the language, and links are provided to more comprehensive online lists.

The rest of the book is dedicated to developing the archetypal shopping cart application, introducing a new concept in each chapter. Whether this is a good thing or not is a matter of personal choice. Some readers will find the step by step development of a complete application a useful way to pick up a new language/framework, whereas others, myself included, prefer concepts to be explained in a more generic manner, so we can quickly apply them to different projects.

The only thing which slightly annoyed me about this book, and is a problem with the whole Pragmatic Programmers series, is the typesetting. A better choice of font would make the reading experience much more enjoyable. However, even with that minor issue, this is a well-rounded introduction to Ruby on Rails, and worth a read if you want to approach the framework as a programmer experienced in other languages but new to Ruby.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.