Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

The Rails Way by Obie Fernandez

By Peter Cooper / December 24, 2007

The Rails Way by Obie Fernandez (published by Addison Wesley) is a long awaited book billing itself as the "expert guide to building Ruby on Rails applications." More precisely, the book dives into nearly every area of the Rails libraries and APIs and acts as a reference work for them. Coming in at about 850 pages, the book is physically very similar to The Ruby Way by Hal Fulton. There's no denying that these two books look good next to each other on the bookshelf, and a lot of comparison can be made between the two.

One of the things I love about Fulton's The Ruby Way is how the book is divided up into chapters covering discrete topics like strings, regular expressions, math, IO, threads, and so on, and then each chapter drills down into twenty or more sections each looking at a different aspect of that topic. The Rails Way veers away from this interesting, cookbook-y style towards a drier, reference book approach. The book is also not broken up into the tidy parts familiar to The Ruby Way readers. For example: REST gets one chapter, but ActiveRecord spans four. Routing is covered in two non-consecutive chapters, leading to an over-reliance on the index or table of contents to find your way around the book.

The differences in pedagogy and writing style between The Rails Way and The Ruby Way are vast, so don't expect similarity. It's possible for a novice Ruby programmer to pick up The Ruby Way and gradually work his way through the book, learning much on the journey, as Fulton covers object orientation principles in chapter 1, before moving onto strings in chapter 2, before diving into the meta-programming voodoo the book is famous for. Each chapter helps build on the last. The Rails Way, in stark contrast, spends its introduction explaining why Rails is so great, without explaining what, exactly, Rails is, and tells us that David Heinemeier Hansson doesn't like being called DHH. Chapter 1 then immediately looks at how the environment and configuration system in Rails works. The content itself is very good, but it's most certainly an "expert guide" as it claims, with little of use to people merely wandering into Rails. It's not a book you journey through from start to end - like Fulton's - but one you pick at over time as an expert.

There's no avoiding that The Rails Way is a reference book, and a good one. If you added a beginner's / tutorial chapter to the start, The Rails Way is what Agile Web Development with Rails should have been. The content is good and Fernandez takes care to cover Rails 2.0, with the book being quite up to date in that regard. This is certainly a book that any expert Rails developer would appreciate on their shelf, unless they were extremely proficient at using online references, but one that novice Rails developers should leave on the wish list for fear of being overwhelmed.

As an aside for detail-obsessed readers, the foreword of the book, written by DHH, is curious. It reads as if the publisher didn't want it to be edited. There's a typo in the very first sentence (and I have not found any others in the rest of the book so far), and the rest of it reads rather clumsily. A last minute rush, possibly?

Comments

  1. Luigi Montanez says:

    Thanks for the review! I've already bought it, and I'd like to reiterate your point that this is an expert's book. I actually think this is its strength, as it's a mature book for a maturing Rails developer community. The chapters on configuration, ActiveResource, Ajax, Rpsec, and deployment are terrific.

    And to be honest, I could have cared less that this wasn't structured like The Ruby Way, or that the Introduction and Forward read a bit awkwardly. I merely glanced at them anyway, as I think most readers will. Just my $.02.

  2. Derek says:

    Now, I haven't read the book, so excuse my presumptions. REST is "The One Way" in Rails now, and I'm down with that. But I'm curious why Rails guides/books tend to shunt REST off into its own little chapter, with little or no mention afterward. I'm often left wondering, "How am I supposed to make my application conform to the RESTful style of development?" Instead, the best I get is yet another tutorial on how to make a nested resource.

    To make matters worse, REST is both the least understood and most controversial part of the Rails framework. How does this book handle REST throughout?

  3. Obie Fernandez says:

    Peter, thanks for the positive review and just want to address a couple of things.

    One, I've never really understood when people call The Ruby Way a "cookbook"-style book. In my efforts, I treated Hal's book as a model for how to write an engaging, interesting *reference* work. That being said, the subject matter of my book is quite different and I took pains to organize the chapters carefully, also making sure that each chapter indeed builds on the last, even when crossing between coverage of the major APIs. (Did you by chance have the opportunity to read the whole book? If so, I'd like to know if you disagree with that last claim.)

    Two, The Rails Way is very much for non-novice Rails programmers. The introduction states "This book is not a tutorial or basic introduction to Ruby or Rails. It is meant as a day-to-day reference for the full-time Rails developer. At times we delve deep into the Rails codebase to illustrate why Rails behaves the way that it does, and present snippets of actual Rails code. The more confident reader might be able to get started in Rails using just this book, extensive online resources, and his wits, but there are other publications that are more introductory in nature and might be a wee bit more appropriate for beginners."

    Unfortunately, you are right that the foreword was rushed (as is very common in the industry). There is a very small typo in the opening of David's foreword, where he wrote "Rails is more than programming framework". It will be fixed in the second printing, which will happen soon in early 2008. There are plenty of other small errors and the ones that readers have found so far can be examined at http://awprorubyseries.lighthouseapp.com/projects/6454-the-rails-way/overview

    Cheers,
    Obie

  4. Obie Fernandez says:

    By the way, RubyInside readers interested in an *exhaustive* review of my book should check out http://www.nateklaiber.com/2007/12/11/the-rails-way-book-review/

  5. SMERF says:

    Dear Obie, I love the way you try to hide your seething rage as you try to conceal your contempt for this particular review. Regarding that "Exhaustive" review, nothing like a 3 page gush-fest written by the "Marketing Director" of a Rails Consultancy. Conflict of Interest anyone?

    5/5 stars? Surprise Surprise! He must really be "exausted" after all that sycophancy!

  6. Obie Fernandez says:

    @SMERF: Seething rage? That's funny.

  7. Peter Cooper says:

    That page is a superb summary of the book's contents, but only a little of the first paragraph and the whole last paragraph are critical review. I'm not sure I see what the conflict of interest is though, SMERF.

  8. Peter Cooper says:

    Anyway, we have this book up from Amazon #2000ish to #800 (as of today) so whatever the review says, people are buying in droves :)

  9. SMERF says:

    1. The dude is not even a bonafide ruby developer, ROR is even further down the line of compentencies for him. Never heard of the guy.

    2. He is a Marketing Director for an RoR consultancy, which have its bread tied directly to the goodwill of the "in crowd" Which is a sad comment on the state of things but to each his own.

    Anyways, maybe I'm off the mark, but there is a lot of TRIPE coming out of the R/oR publishing pipe because everyone and their uncle is trying to make a buck. Sure. Fine. Maybe the Core people have some right to that cash too.. so whatever. But just don't try to manage the message so much that you lose all credibility.

    5 Stars from a marketing person with a vested interest in hyping the book is not really that high in my book. So what if this guy criticized your book a little bit, he praised it too, and that makes him more credible in my eyes.

    So, here is the thing:

    Real world reviewes are not not going to look like the shameless gushfest you see on every web 2.0 page... (including 37 signal properties) .. so don't even try to intimidate community members into giving sterile one sided "reviews" it only hurts your credibility.

    just my 2c.. maybe I got it wrong on all counts. I stopped using the train framework long while back, so .. whatever.. I read this blog as it is more Ruby oriented and engages in a lot less Hand-Jobbery than the average ror blog.

  10. Samo says:

    SMERF you come over as a tinfoil hat kind of guy. Why would a RoR consultant hype a RoR book? Seriously, doesn't a good RoR book take work away from him (if people know Rails well enough, why hire a consultant..)? Besides, Obie et al are not cramming the book down anyone's throat, so I don't see the problem.

    There might be a lot of tripe, but that's the case with every technology that gets widespread use, there are always people who think they can write the "better" book, and there are always those who seem to get upset about such a topic.

    Anyhow, The Rails Way and The Ruby Way are the next 2 books on my list, gushing or not. I hope that doesn't upset you too much.

  11. Peter Cooper says:

    Strongly stated, but you do have some good points, SMERF. This is exactly the sort of thing I steer clear of. There are certainly some expectations in segments of the community that everything is clean, nice, subliminally commercial, and a lot of back scratching. This is natural in a small but growing area that could become a lot more commercial, I feel, but I try my best not to get wrapped up in the politics.. even if, ironically, that means I'm not top of everyone's Christmas card lists, if you know what I'm saying.

  12. Nate Klaiber says:

    @SMERF
    Wow. That is a lot of bitterness and assumptions coming from one person.

    I'll explain a little more. I don't know Obie, personally - so I have no reason to scratch his back. My personal site, which was where the review was placed, is full of other book reviews related to web development as well. I previously read the Ruby Way and was looking for a book like that - only geared towards Rails - and I found it with this book. In all honesty, I am very generous with my reviews (the majority are 5/5 stars - because they do what they say they do, and are geared towards the audience they say they are geared to). When I review a tech book I am not reviewing a novel. I read and check the code (does it work?), I check to see if the book actually teaches to the intended audience (If I was a beginner, would I be able to understand this book? Or intermediate, advanced, etc?), and I check to see if the topics are covered as stated from the back cover or intro. I am not nitpicky about writing styles or the personality of someone - I rate it on if they wrote the book 'as advertised.'

    The length of my reviews are usually rather long. I prefer them that way, and have received feedback from others who prefer them. They are better than the typical Amazon "I loved this book! 5 stars from me!" - that give no context or information about why the book was great, or even what it contained. If I was searching for a book, and was reading a review - I would want something where someone actually took the time to write a review and give the book due credit. If I was searching for a book that covered Observers in Rails, that one line review wouldn't help me much - but a review that lets me know it was covered in the book, maybe with just what I was looking for - that is actually helpful. My goal is to write helpful reviews, not context-less one-line Amazon reviews. If you don't like the length, by all means - you don't have to read it.

    I have no reason to rate a book lower because I don't like the author, or because I thought their writing style was dry. Again, it isn't a fiction novel - it is a tech book. It is also important to note that my personal site, besides the reviews, is a way for me to manage my personal library of books. I am launching a new site in January, custom built on rails, with the data models and meta data I need to manage my books and reviews.

    In your rant of assumptions, you assume that since I don't have a loud voice in the community, I must not be a Ruby developer. ("The dude is not even a bonafide ruby developer, ROR is even further down the line of compentencies for him. Never heard of the guy.") So you know my competencies? Where is this 'line' that you are talking about? You know I am not a bonafide Ruby developer...all because YOU never heard of me? Excellent logic. My official title is Marketing Director, but I spend the majority of my time in Ruby/Rails. I work on our Reflect CMS, I work on our personal site, and I work on our client sites. I do more Programming than I do 'Marketing' - I apologize for the confusing title. There are three of us in house, so we all wear different hats at different times. Previously, I worked with PHP and was a ZCE, but didn't have a loud voice with the PHP community. I made the move to Ruby/Rails over a year ago, and I don't claim to be an expert - but I am constantly seeking to learn more (hence the reason I read this book). But, for future reference, you probably 'wont hear of me' - and I don't mind that. I have no 'bread tied to the in crowd.'

    "5 Stars from a marketing person with a vested interest in hyping the book is not really that high in my book." Another great assumption, so what is my vested interest? I have no ties with the Ruby community. I don't know Obie on a personal level. What exactly is this vested interest you are speaking of? Please enlighten me.

    I would respond to you personally, but I don't know you and SMERF (with no links) - helps very little. However, I will refrain from making the same bogus assumptions you did in your responses.

  13. Peter Cooper says:

    "I have no reason to rate a book lower because I don't like the author, or because I thought their writing style was dry. Again, it isn't a fiction novel - it is a tech book."

    I'm the one who made a reference to dryness, and while you might not consider dryness an issue in a book, I do. It's not necessary a bad thing or a good thing, but it's certainly an aspect to be considered. My primary comparison was with The Ruby Way, a book that, by its title, is in the same "family" as this one.. but which is not a dry book at all, compared to The Rails Way's far drier approach. I guess my main issue is that even though the books are designed similarly and have similar names, they do not really relate well to each other at all in what their jobs are, even though as a standalone book, they are both very good.

  14. Nate Klaiber says:

    @Peter
    I understand what you are saying. My response wasn't geared towards anyone specific (in regards to dryness) - that is more of a personal preference issue. I agree that it does play into the quality of any book. Usually, books that are dry take me a little longer to read - they don't capture/keep my attention as well. However, I still take the time to get through them and soak up any knowledge that I can.

    I wouldn't say The Ruby Way and The Rails Way were the same in writing styles, just that they both provided an exhaustive coverage of Ruby/Rails. The writing styles and organization of the two books are different, no doubt about that.

    I didn't worry about the lack of beginners stuff, because it isn't a beginners book. Complaining about that aspect doesn't cover the contents of the book. Also, while it shares some aspects with the Ruby Way - it isn't the Ruby Way. I didn't want to spend time apologizing for lack of beginner coverage, when it wasn't supposed to be in there anyway. It is also it's own unique book - so I didn't spend a lot of time comparing it to The Ruby Way.

    Personally, I think your review is excellent - spot on. I especially agree with:

    "The Rails Way is what Agile Web Development with Rails should have been."

  15. Peter Cooper says:

    See, that's what I thought The Ruby Way wasn't.. an exhaustive coverage of Ruby. That's the Pickaxe's job. The Ruby Way feels, to me, more like an interesting walkthrough a number of areas, but far from exhaustive. I thought The Rails Way might be similar.. an indepth walk through many interesting areas of Rails, rather than a reference guide. But.. I certainly feel that as a reference guide, The Rails Way is very good, and why it is what AWDwR should have been (that is, AWDWR should have been the Rails equivalent of the Pickaxe, but it turns out The Rails Way has taken that role instead).

  16. SMERF says:

    You know, my intent wasn't to attack the reviewer (Nate) but yeah, reading the comment again it did come out that way. Should have sat/slept on that comment before posting. More than a lax review, my beef is the general attitude of "message control" which seems to pervade (mostly) the rails community. I think others have said more eloquently than myself, but every time someone says something which has even a hint of something not along "the party lines" there is this swift "drive by" response (not my coinage, people have described this behaviour on other comments before.) regardless of who said it. I think only Matz and the Japanese crew has been safe from it, mainly because they've had the good sense to stay out of this political game.

    Sad thing is that even prominent community members are not spared this humiliation. In my eyes (and I'm just an insignificant joe, I don't contribute code, I just take Ruby and its modules etc shamelessly and use them sometimes) , Peter has done almost as much for the Ruby community as any rails core dude (and I've been off and on "the wagon" as it were) and it just rubbed me the wrong way the manner in which his review was handled. For the record I don't know him except through Ruby Inside and I think this blog does a great service for the Ruby community. Obviously I don't have the tact or the eloquence that Peter has so my comment turned into a rant.

    Last Rubyconf I felt Matz was basically pleading to the community to be civilized to each other. He kept saying You are nice, but I thing the subtext was the twitter wars and the various other drive by's that had happened during the year which basically gave the community a black eye and a nasty reputation. What I read was, stay the way you were, not this "new" thing you are becoming which is nasty and unforgiving and just generally unpleasant.

    I am saying all this because I don't want (FWIW) this community to devolve into something that Ruby community really never was. If that means giving back someone a taste of the "Asshole" medicine, then so be it. It doesn't feel so good on the receiving end does it?

    Anyways, take it as a paranoid rant or whatever. that's all it probably was.

  17. Samo says:

    @SMERF: I understand your concerns as far as the community goes, but I think it's a bit too late now. Ruby through Rails had a huge impact, got to be the "in" kid on the block and as such attract a lot of people that simply want attention, for better or worse. The elitism that some display is sickening and I wouldn't be surprised if a lot of people new to Ruby and Rails got a bad first impression of "arrogant assholes". The downside is that such people base their self-worth on their decision to use Ruby/Rails ("I use Rails, therefor I am better!") and as soon as someone points out a fault they take it too personal ("I chose it, you say it's not perfect, so this means you think I made a stupid decision").

    At least that's my armchair psychologist impression. And even though the number of such people is really, really small, they are vocal enough to be noticable and make a bad impression.

    On the other hand, these people are almost never the ones who contribute anything meaningful to the community and as such can actually be ignored.

  18. Peter Cooper says:

    SMERF: I think you've put your point quite well, and thanks for the compliment, although I certainly feel that code talks better than evangelism, book writing, or whatever else it is I tend to get involved in instead, but that's just how it goes :)

    Samo: It makes me wonder how much of that has been influenced by DHH. People tend to act like people who are more successful than them or who are highly influential within their community. He's become less arrogant with time, but I suspect a lot of people act like "arrogant assholes" because DHH used to do that act and those people want to be like him somewhat.

  19. Nate Klaiber says:

    @SMERF
    Very well put. I understand exactly what you are saying. I sat (as an outsider) in some of the recent wars, especially Rails vs. PHP, as I used to be a PHP programmer for 7 years prior to moving to Ruby. My reason for moving to Ruby/Rails was the elegance of the Ruby language. A true OO language made things such a joy to work with. That doesn't mean I don't like PHP, I just have a new preference.

    @Samo
    "On the other hand, these people are almost never the ones who contribute anything meaningful to the community and as such can actually be ignored." Amen!

    I think many of these reasons are why I choose not to be vocal in the community (the same arrogance takes place in other languages/frameworks, too). I just don't feel the need to get involved with any politics. I have no beef with anyone (I don't know any of them personally). Like Peter said "code talks better than evangelism, book writing (...)" - I agree wholeheartedly.

  20. Samo says:

    @Peter: DHH's "opinionated software" approach likely had an influence, yes. But while DHH very well was in a position to be a bit more arrogant (he wasn't "just talk", he wrote Rails), others aren't. I'm just a bit sorry, because I've seen a huge amounts of people doing really good work and they simply never considered going more public with it because they know that they would need to spend a lot of time baby-sitting the community around it.

  21. Peter Cooper says:

    You're spot on with your last comment. I certainly think there's been quite a few good developments that haven't had as much exposure as they should have, due to hesitancy on the part of the developer. Unfortunately, though, it's the original developer who has to do the promoting, simply due to the volume, although some bigger projects, such as Merb or RSpec, have gotten a large number of evangelists quickly.

  22. SultanOfPing says:

    I thought I'd pick up a new language for the new year, and Ruby ( and Rails ) was going to be my study of choice. I started in earnest looking for resources today, and every Ruby related blog or review I've read ( not exhaustive ) has this kind of harranging and bickering on it.

    As a newcomer to a language, I have to rely on the established and learned to help out if I get in a jam. The Rails community feels like it's made up of kids calling each other asshats and posturing for position.

    I'll probably still pick it up, but I'll be a silent and solitary student.

    Just my tuppence.

  23. Peter Cooper says:

    And Ruby Inside has less bickering on it than many.. :)

  24. JFred says:

    Save The Trees!

    Or at least help me search the text. Is the book available as a PDF? And why not? Adobe Acrobat hasn't got fast search, I guess it's too much for them. But they have a text search that's faster than reading the book all over again.

    Okay, to heck with the trees, if you want. Just sell me a PDF.

    And how is the index?

    Jfred

Other Posts to Enjoy

Twitter Mentions