Excellent New Rails Book 1
Posted Sunday, August 19, 2007 22:42
With all the “how to build an application in Rails” books that have come out this year, do we need more? Yes!
RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series)
RailsSpace is a well-written, insightful introduction to Rails that uses the creation of a simple social networking application to tell the story. It’s not a reference book, and it may move too quickly for absolute beginners. But for more experienced readers who are new to Rails, or for Rails developers with some experience who are looking to learn a few new tricks and pick up some best practices, this is a great book. The step-by-step creation of the social network application (and thankfully not another shopping cart) provides a cohesive structure and creates natural opportunities to introduce a wide variety of topics.
Author Michael Hartl was previously a physics instructor at Caltech, and his teaching experience shows. The book progresses naturally, explaining just enough as it goes along to keep the reader oriented without too many diversions. This is a real challenge in an introductory Rails book, since there’s a lot of pieces you need to understand to some degree before it all makes sense. Coauthor Aurelius Prochazka is a very experienced web developer, and this too shows through. The book is full of insights and best practices that make it more than just an introductory text, and also make it an enjoyable read.
Although the book only scratches the surface of many advanced Rails topics and doesn’t go too far into Rest or Ajax, it covers well a number of topics that are often neglected in introductory books. Testing is addressed nicely; the book doesn’t use a test-driven development (TDD) approach, which interferes with learning the basics of Rails, but it does show how to test each feature after it is built. It also has a good section on searching, covering both the use of Ferret and the creation of searches using multiple, specific model fields.
There’s a companion web site, built using the code from the book, at which you can browse the source code. You can also download a sample chapter, RESTful Blogs.
Experienced Rails developers may want to wait for two very promising books due out later this year: Mike Clark and Chad Fowler’s Advanced Rails Recipes, and Obie Fernandez’s The Rails Way.
New Ruby on Rails Books 0
Posted Friday, January 26, 2007 10:42
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.



