<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Talk Like A Duck: Category book_reviews</title>
    <link>http://talklikeaduck.denhaven2.com/articles/category/book_reviews</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In Ruby, it's not the dog, it's the tricks!</description>
    <item>
      <title>Book Review: The Rails Way</title>
      <description>&lt;a href="http://www.amazon.com/gp/product/0321445619?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321445619"&gt;&lt;img border="0" src="http://talklikeaduck.denhaven2.com/files/2007-12-26_railswaycover.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=0321445619" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;

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.
&lt;p&gt;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.&lt;/p&gt;



&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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 &lt;a href="http://www.amazon.com/gp/product/0977616630?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0977616630"&gt;Agile Web Development with Rails&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=0977616630" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; 
snd only slightly less than &lt;a href="http://www.amazon.com/gp/product/1590598474?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1590598474"&gt;Pro Active Record: Databases with Ruby and Rails&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=1590598474" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; which is totally dedicated to ActiveRecord.
&lt;/p&gt;
&lt;p&gt;This is about as far as I've managed to get through to date, the remainder of this review is based on skimming.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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 &lt;/p&gt;
&lt;p&gt;Chapter 13 gives us 15 pages on managing sessions, including the latest on Rails 2.0's new CookieStore default for "storing" session data.&lt;/p&gt;
&lt;p&gt;Chapter 14 is all about user login and authentication.  Seventeen pages are devoted to using Rick Olsen's &lt;a href="http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated"&gt;acts_as_authenticated&lt;/a&gt; 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 &lt;a href="http://weblog.techno-weenie.net/2006/8/1/restful-authentication-plugin"&gt;restful_authentication&lt;/a&gt; plugin, or so some commentary in the acts_as_authenticated plugin itself leads me to believe.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;ActionMailer gets it's due in Chapter 16.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Chapter 21 covers Capistrano 2.0 in 25 pages, while Chapter 22 wraps up with 16 pages on background processing.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This book, as I said before, is a tome like Hal Fulton's &lt;a href="http://www.amazon.com/gp/product/0672328844?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0672328844"&gt;The Ruby Way&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=0672328844" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, 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 &lt;a href="http://awprorubyseries.lighthouseapp.com/projects/6454-the-rails-way/overview"&gt;tracking errata.&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;All in all I heartily recommend &lt;a href="http://www.amazon.com/gp/product/0321445619?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321445619"&gt;The Rails Way&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=0321445619" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; as a resource for Rails developers wanting to move on from white or green, to black-belt status.&lt;/p&gt;</description>
      <pubDate>Thu, 27 Dec 2007 12:57:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f2fe3229-39bb-40c3-9e61-a4dcc91d66e5</guid>
      <author>Rick DeNatale</author>
      <link>http://talklikeaduck.denhaven2.com/articles/2007/12/27/book-review-the-rails-way</link>
      <category>book_reviews</category>
      <category>rails</category>
      <trackback:ping>http://talklikeaduck.denhaven2.com/articles/trackback/483</trackback:ping>
    </item>
    <item>
      <title>Book Review: Pro Active Record</title>
      <description>&lt;a href="http://www.amazon.com/gp/product/1590598474?ie=UTF8&amp;tag=denhaven2com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1590598474"&gt;&lt;img border="0" src="http://talklikeaduck.denhaven2.com/files/2007-10-30_cover_of_pro_active_record.jpg" style='float:left;  margin-bottom:30px; margin-right:30px;'&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;l=as2&amp;o=1&amp;a=1590598474" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; 
I've been meaning to write a review of the recently published Apress book &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FPro-Active-Record-Databases-Rails%2Fdp%2F1590598474%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1193756135%26sr%3D1-1&amp;tag=denhaven2com-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325"&gt;"Pro Active Record"&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;amp;l=ur2&amp;amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; by Kevin Marshall, Chad Pytel, and Jon Yurek for a while now. I have to admit that I was prompted to sit down and actually do it after reading &lt;a href="http://blog.hasmanythrough.com/2007/10/29/book-review-pro-active-record"&gt;Josh Susser's recent review of the same book.&lt;/a&gt;
&lt;p&gt;While I generally agree with Josh's assessment, We do differ a bit on which audience the book best serves.&lt;/p&gt;
&lt;p&gt;The goal of the book is to cover Active Record in depth, outside of the context of Rails.  The result, as I see it, is a book which is useful to intermediate to advanced users of Active Record, those who want to dig in to understanding the implementation and perhaps extending it.&lt;/p&gt;
&lt;p&gt;My own reading of the book gave me the impetus to explore the code of Active Record to the extent where I felt comfortable submitting contributions to Rails.  Since reading the book, I've written and submitted two active record patches to the Rails Trac. The &lt;a href="http://dev.rubyonrails.org/ticket/9971"&gt;first&lt;/a&gt; fixed an oversight which made the schema.db file dumped for MySQL tables with non-standard primary keys to lack those primary key declarations, and the second is an enhancement which allows the :joins option of methods like find and count in ActiveRecord::Base to take&lt;a href="http://dev.rubyonrails.org/ticket/10012"&gt; values like the :include option&lt;/a&gt; as an alternative to a sql joins clause string.  Both have made it into rails edge!&lt;/p&gt;



&lt;h2&gt;Pro Active Record for Beginners?&lt;/h2&gt;
&lt;p&gt;While I suppose that you could learn Active Record just from this book, I personally think that &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FAgile-Web-Development-Rails-2nd%2Fdp%2F0977616630%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1193759512%26sr%3D1-1&amp;tag=denhaven2com-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325"&gt;Agile Web Development with Rails (2nd ed)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;amp;l=ur2&amp;amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; does a better job, and makes a better reference for everyday use of Active Record.  While not entirely devoted to Active Record, AWDWR devotes four chapters and 131 pages to it in the "Rails in Depth" section of the book, in addition to coverage of AR in the tutorial section.  In contrast, "Pro Active Record" comprises 8 chapters in 214 pages, plus a 52 page Appendix which is pretty much derived from the RDoc generated from the Active Record source code.&lt;/p&gt;
&lt;p&gt;Shortly after I bought the book, I was working on an issue with some active record validation callbacks on one of my projects. Since "Pro Active Record" was at hand I turned to it.  Although they have good coverage of the topic in Chapter 4, "Core Features of Active Record", the five pages of text description in PAR just doesn't make it as clear when particular callbacks will be called as the single chart on page 372 of the "Object Life Cycle" chapter in AWDWR.&lt;/p&gt;
&lt;p&gt;While some newcomers to active record who are using, say Camping, might welcome the "Rails-free" presentation of PAR, sometimes I get the impression that studiously eschewing Rails in this book hampers it just a bit. There sems to be a little too much repetition of things that Rails does for you, like ActiveRecord::Base.connect(...)&lt;/p&gt;
&lt;h2&gt;Digging In&lt;/h2&gt;
&lt;p&gt;That said, I do really like the book.  The chapter on dealing with legacy databases is quite useful, and I'd recommend it.&lt;/p&gt;
&lt;p&gt;The best part of the book was the section on extending AR. It gives a good introduction to the way AR works, it got me started actually reading the AR code in edge rails.  It also gives some good coverage of Ruby metaprogramming, particularly in the context of AR and Rails&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;So all in all, I recommend the book, although I would recommend newcomers to start with &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FAgile-Web-Development-Rails-2nd%2Fdp%2F0977616630%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1193759512%26sr%3D1-1&amp;tag=denhaven2com-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325"&gt;Agile Web Development with Rails (2nd ed)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;amp;l=ur2&amp;amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; even if they are using AR outside of rails.&lt;/p&gt;
&lt;p&gt;Those who are, or want to be, a little further along in their exploration, exploitation, and extension of Active Record will find it to be a valuable addition to their book shelf, just as I did.&lt;/p&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:31:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:bacdbcc3-19b3-4cd9-87fd-2ecae8c6c150</guid>
      <author>Rick DeNatale</author>
      <link>http://talklikeaduck.denhaven2.com/articles/2007/10/30/book-review-pro-active-record</link>
      <category>book_reviews</category>
      <category>rails</category>
      <category>activerecord</category>
      <trackback:ping>http://talklikeaduck.denhaven2.com/articles/trackback/476</trackback:ping>
    </item>
  </channel>
</rss>
