The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Book Review: The Rails Way

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Rick DeNatale

Posts: 269
Nickname: rdenatale
Registered: Sep, 2007

Rick DeNatale is a consultant with over three decades of experience in OO technology.
Book Review: The Rails Way Posted: Dec 27, 2007 10:21 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Rick DeNatale.
Original Post: Book Review: The Rails Way
Feed Title: Talk Like A Duck
Feed URL: http://talklikeaduck.denhaven2.com/articles.atom
Feed Description: Musings on Ruby, Rails, and other topics by an experienced object technologist.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Rick DeNatale
Latest Posts From Talk Like A Duck

Advertisement
Disclaimer: I received a free copy of this book because I contributed a one-page essay about "What Rails Means to Me" which appears starting on page 821.

The Rails Way came out shortly before Rails 2.0 was released. I must say that it serves as a very valuable reference for those with some Rails experience, and in particular for those who are coming up to speed on Rails 2.0.

Comprising 850 pages, this tome covers a wide spectrum of Rails and Rails related topics. Although it's been a while since I was a newcomer to Rails, I think it would be a rare newbie who could jump into Rails and learn it by reading this book. Although some sections are written in a tutorial style, it really serves best as a resource for those wanting to increase their mastery of Rails. I've found many thought provoking ideas as I read it.

Obie's approach is to pick an aspect of Rails and talk about how it's put together as a way of providing a more intimate view of the framework. I find this very comfortable, it's kind of a an advanced guided tour.

The book starts out with a walk-through of how Rails starts up, giving the opportunity to explore how Rails configuration works, and how it relates to the various rails environments.

The next four chapters, comprising 101 pages, talk about controllers and routing. There's a lot of valuable information here, particularly with regards to Rails 2.0, and how RESTful controllers, resources, and routing works.

From there, the book moves on to ActiveRecord. Four chapters cover the basics, associations, validations, callbacks, observers, single-table inheritance, and more in 167 pages, a book-length treatment in itself. This is more than the 131 pages on ActiveRecord in Agile Web Development with Rails snd only slightly less than Pro Active Record: Databases with Ruby and Rails which is totally dedicated to ActiveRecord.

This is about as far as I've managed to get through to date, the remainder of this review is based on skimming.

The coverage of ActionView starts with a chapter covering the basics of ERB, tne new naming conventions in Rails 2.0 (e.g. a view named index.rhtml would now be named index.html.erb); layouts, templates and partials; and various aspects of caching in Rails and how to tame it.

Chapter 11 covers helpers. Among other things, Obie covers the popular topic of how to write form views which handle updating multiple objects simultaneously. He covers both built-in Rails helpers as well as those provided by popular plug-ins such as the various pagination plugins. Of course he also covers the niceties of writing your own helpers.

Chapter 12 devotes 48 pages to Ajax on Rails, starting with the very valuable advice to install and use Firebug to debug the resultant Javascript, then covering Prototype and Scriptaculous and their associated helpers, RJS and JSON

Chapter 13 gives us 15 pages on managing sessions, including the latest on Rails 2.0's new CookieStore default for "storing" session data.

Chapter 14 is all about user login and authentication. Seventeen pages are devoted to using Rick Olsen's acts_as_authenticated plugin. This is one area of the book which is already slightly dated, particularly for Rails 2.0, since acts_as_authenticated has been supplanted by Rick's newer restful_authentication plugin, or so some commentary in the acts_as_authenticated plugin itself leads me to believe.

Chapter 15 covers XML in 26 pages. The ability to produce and consume XML is part and parcel of fully supporting REST in Rails and the use of ActiveResource. Obie also covers how to generate XML, and the use of the Builder framework; parsing XML using the XMLSimple library built in to Rails; leading up to an exposition of ActiveResource.

ActionMailer gets it's due in Chapter 16.

Testing, and test-driven development gets two chapters. The 51 pages in Chapter 17 cover "classical" Rails testing using Test::Unit, while Chapter 18 adds another 30 pages on RSpec and the RSpec on Rails plugin.

Chapter 19 covers plugins from multiple aspects: managing them with the script/plugin command, keeping them under version control with subversion and Piston; and a basic overview of how to write your own plugins.

The last three chapters cover deployment. Chapter 20 discusses the Rails deployment landscape covering the requirements for a Rails "Stack"; the installation and configuration of various stack components (Ruby, RubyGems, Rails, Mongrel, MongrelCluster, Nginx, Subversion, MySQL, Monit, and Capistrano); writing init scripts for Mongrel, Monit, and Nginx; and a very brief overview of production stack considerations related to performance, reliability and security.

Chapter 21 covers Capistrano 2.0 in 25 pages, while Chapter 22 wraps up with 16 pages on background processing.

Finally, there are two appendices. Appendix A covers ActiveSupport, and Appendix B is a catchall for useful things Obie thinks every Rails developer should know, but didn't have another place in the book.

Conclusion

This book, as I said before, is a tome like Hal Fulton's The Ruby Way, also in the Addison-Wesley "Professional Ruby Series." While both suffer from minor editing omissions and mishaps, "The Rails Way" seems to be a bit more polished, and Obie has set up a lighthouse site for tracking errata.

All in all I heartily recommend The Rails Way as a resource for Rails developers wanting to move on from white or green, to black-belt status.

Read: Book Review: The Rails Way

Topic: Congrats to Release It! Previous Topic   Next Topic Topic: Graphing Spam

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use