New Ruby on Rails Books 0

Since I wrote my piece on Ruby on Rails books, three more books have come out. Here’s my initial take on them.

The Rails Cookbook, by Rob Orsini, is a great collection of simple recipes for getting things done with Ruby on Rails. It starts off with the basics, including getting Rails installed on various platforms, and setting up your development environment. Then there’s sections on Active Record, Action Controller, and Action View, each of which starts with simple recipes for the basics (like defining your tables with migrations and using the Rails console) and moves on to more advanced topics (such as modeling a threaded forum with acts_as_nested_set). The book has been fully updated for Rails 1.2.

Following this core material, there’s sections on:

  • RESTful development
  • Rails application testing
  • JavaScript and Ajax
  • Action Mailer
  • Debugging
  • Security
  • Performance
  • Hosting and deployment
  • Plugins
  • Graphics

Each of the recipes is short—typically just a page or two. You won’t find in-depth tutorials here. But you will find clear, simple explanations of how to accomplish a wide variety of common tasks with Rails. The book covers not just the core rails application material, but also how to use additional tools and plugins (such as Httperf for performance measurement, memcached for improving access times, and Firefox extensions for debugging).

This is a great book to have by your side after you’ve been through one or two of the core books and are building your first real application. More experienced developers will know much of the material in this book, but they’ll also find it valuable when looking for a quick start using a feature they haven’t tackled yet.

While the Rails Cookbook is extremely broad and necessarily somewhat shallow, Ajax on Rails by Scott Raymond is narrow and deep. This book doesn’t try to cover Rails basics but focuses on using Ajax to create smoother user experiences for Rails applications. The first half of the book is a tutorial that starts with an explanation of what Ajax is, how it works under the covers, and how it is integrated into Rails. It then introduces the Prototype and script.aculo.us libraries and the use of RJS templates. Following this are sections on Ajax usability, testing and debugging, security, and performance.

The second half of the book provides a complete reference to the Prototype and script.aculo.us libraries and three example applications: a review quiz, a photo gallery, and a workgroup collaboration application. These complete examples (which you can download here) are very helpful to see how all the pieces come together to create a real application.

This is a book to get after you’ve been through a couple of the other books, built an application or two, and want to dive more deeply into using Ajax in your application.

Rails Solutions, subtitled Ruby on Rails Made Easy, lives up to its subtitle. Written by Justin Williams, this is an introductory book aimed at web designers, not experienced developers. If you have a software development background, you can skip this book. But if you’re a web designer who maybe has done a little PHP and wants to quickly understand what Rails is all about, this book is a good start.

This book is a much shorter, and easier, read than the classic introductory book, Agile Web Development with Rails, or the excellent Ruby for Rails it won’t take you nearly as far, but it is a quicker and gentler introduction. You’ll learn enough to build a simple Rails application, and then you can move on to the other books to deepen your knowledge.

The main competitor to this book is Beginning Ruby on Rails. That book provides somewhat more tutorial content about programming concepts, and therefore doesn’t move you quite as quickly through building an application.