Rails Recipes: Rails 3 Edition – Solutions to 70 Problems & More – #bookreview #in #rails #programming

Rails Recipes: Rails 3 Edition
Chad Fowler
Pragmatic Bookshelf, paperback, list price $35.00)

Chad Fowler’s Rails Recipes: Rails 3 Edition is aimed at developers who need to solve tough problems while using Rails. But Rails beginners also can learn plenty from the 70 “recipes” in this excellent guide.

The 280-page book is divided into seven parts. Busy Rails developers can jump directly to any part that deals with their latest vexation. Those new to Rails also can read the book in any “recipe” order, or they can take it straight through like a textbook.

The seven parts are:

  1. Database Recipes
  2. Controller Recipes
  3. User Interface Recipes
  4. Testing Recipes
  5. Email Recipes
  6. Big-Picture Recipes
  7. Extending Rails

The author uses a simple problem-solution approach. For example, in Recipe 28, the problem is: “You notice a recurring pattern in your application. You’re writing code for the same actions over and over again in your controllers.” The solution Fowler presents involves learning how to use the Rails versions of macros to create “code that writes codes for you….” by taking “advantage of Ruby’s metaprogramming capabilities.”

He then shows how, noting that “Ruby, like Lisp and Smalltalk before it, allows programmers to easily write code that writes and loads code at runtime.” He adds: “This is a really deep topic, and we’re not going to attempt to dig too deep into it here. Instead, we’ll focus on the details necessary to implement our own Action Controller macros.”

Each recipe spans only a few pages but is presented clearly and is well illustrated with code examples.

Anyone working with Rails or still adding it to their programming capabilities should consider getting Rails Recipes: Rails 3 Edition and keeping it within easy reach.

Si Dunn

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s