-
Get a monthly update on best practices for delivering successful software.
IntroHead First Rails by David Griffiths is one of the newer additions to the Head First series by O'Reilly. It provides an excellent introduction to Web Application development using Rails as the underlying framework. Head First books take a much different approach to learning development subjects than most texts. The pages are filled with humorous drawings, novel dialogs, and funny diagrams to keep your brain stimulated (and entertained). This being the first book I've read in the Head First series, I much enjoyed the conversational style and approach David Griffiths took to teaching.
The book presents it's projects as sets of real world problems. For example, the first problem Griffiths gives you is conveyed as an email from a friend who needs help developing a basic ticketing application for his company. The features and requirements are basic CRUD, and lend themselves to learning about Rails scaffolding. Griffiths covers setting up your rails application, getting your database up and running, models, migrations and other basic essentials.
As the book continues, and as new problems are presented to the user - Griffiths slowly removes the scaffolding and teaches you the internals and structure of a given Rails application. My favorite parts of the book are titled, "There are no Dumb Questions". This is the kind of section that I would love to see in all programming books I read; especially introductory ones. Many authors tend to take for granted some of the subtleties and 'gotchas' when teaching a new topic, and this section lends itself quite well to those questions that are often easily skipped. Chapter reviews and short quizzes are also given in several different formats, with the philosophy that everyone has a different learning style - Quite appropriate if you ask me.
One of the big hurdles of people who are new to Rails is usually figuring out where everything goes. After starting a new Rails project, it's easy to be overwhelmed by all the new files and folders if you're not familiar with the directory structure and layout of the framework. Griffiths does an excellent job along the way clarifying what part of the project each item should go in (model, view, controller or otherwise). Coupled with this, he also does an excellent job diagraming the framework execution process as it passes from the user action to routing, controller, model and view (and possibly other intermediate stops). At it's core, he's trying to teach an understanding of the entire process rather than teaching memorization - something that resonates much better with me.
The book finishes by touching on some of the more advanced topics of Ajax requests, XML and REST. Although these might seem like daunting topics for an introductory book, Griffiths does a wonderful job keeping things simple, and giving the reader an excellent taste of some of the more powerful avenues of web application development. The focus here is doing something cool: He's trying to interest the user's imagination and get them excited.
One criticism I have for Head First Rails is it's lack of unit and functional testing. It's quite possible that a new user might have no interest in learning testing, and thus it might come as an obstacle to enjoying Rails. But seeing as how it's a main header on the official Rails Guide, I would say that it's at least worth a mention. Quoting David Griffith's interview about the book:
"So really the whole book is about how to do cool things. Like build a custom web application in two minutes. Or manage multiple data sets in a single interface. Or create a mashup with Google maps. Or using Ajax in really practical ways, not just for eye-candy. Cool is really just another word for powerful and I want people to finish this book armed with practical skills that they can apply from the get-go."
Perhaps this is why testing has been excluded from the book. But again, I would have liked to see it touched on - if only briefly.
If you're looking for a detailed technical manual or API reference, this is definitely not the book you're looking for. If you have never done any web application development, and want to try Rails as a way to get started - This book is for you. Head First Rails assumes you:
Head First Rails provides a clear and easy to follow jump into Rails and works as a great gateway down other web development roads.
Related posts:
Topics: book review, Books, OReilly, rails, Review