If you are interested in getting started with Rails, this is the way to go. I'd recommend you read the first few chapters of Thomas' "Programming Ruby" first, to get a foundation in ruby first.
there's too much going on here for this to be accessible to rookie programmers, i found i ended up going through the motions a lot without truly understanding what was going on underneath.
Rails, or more appropriately Ruby on Rails is the new web application development framework that everyone is so excited of and raving about how it cuts development time by a factor of 10 and does away with the cumbersome XML configuration files that are the hallmark of J2EE.
Being an old Java hand, I wanted to see firsthand if there was some substance beneath all the hype. I was also intrigued by the fact that many other old Java hands whom I respect and admire, like James Duncan Davidson, Elliotte Rusty Harold, Bruce Tate, Graham Glass, and Brian McAllister are now fervent (to different degrees) rubyists and Rails-enthusiasts. If it weren't for them, I would never have undertaken this journey, probably.
But anyway, this is supposed to be a book review, not a chronicle of my ongoing discovery of Rails.
I mostly like using books to discover and learn about new technologies, so it's perfectly natural that I decided to take off with what is considered the book about Rails. And how could it be not, with Rails' creator David Heinemeier Hansson as one of its authors?
It is also the only one published so far but, even though the choice was a bit, uhm ... limited, I wasn't disappointed. The book, as is customary with titles from The Pragmatic Programmers' bookshelf, is very good. It lays down in detail almost everything you need to know to be productive with Rails, save for the language Ruby itself. To be honest, the book includes an appendix introducing the basics of Ruby, but it's just the bare minimum. I suggest getting yourself a good Ruby book (like Programming Ruby, also from The Pragmatic Programmers, which I am currently reading and will review shortly) if you really want to get the most out of Rails.
Another caveat you have to be aware of is that Rails is a quickly moving target. The book covers version 0.13, which was current around mid-2005. There was a 0.14 version after that and we are now at 1.0, since a few weeks ago. However, I didn't find I had much to change while experimenting with Rails following the book. As always with Open Source software, resorting to the mailing lists, forums or the #[email protected] IRC channel is the best avenue for finding answers to your doubts and asking support questions.
The book is organized in four parts:
Part I introduces the design principles behind Rails, its most important concepts and briefly covers how to get started by installing it and writing your first program. The part about installation is the one that is bound to become quickly obsolete, as new and easier installation methods for the various supported platforms are developed.
Part II dives into Rails by guiding you along the development of a real (albeit much simplified) e-commerce application. I find this approach to be very good and "pragmatic" indeed. Of notable interest is the chapter on testing. It's great to see that providing a good test scaffolding was one of the main design concerns in Rails and not just an afterthought.
Part III goes deeper into Rails and can be used as a reference for its components, like Active Record, Action Controller, and Action View. Bonus chapters on AJAX, Web Services, security, deployment and scaling issues are included here and will make the book even more valuable when you need to deal with "real world" applications.
Part IV contains the appendices, like the above mentioned introduction to Ruby, a reference of configuration parameters (be warned again: these might change), the full source code for all samples (of dubious value, in my opinion), and a list of online resources (once again, a list bound to be more and more incomplete as time passes and the excitement around Rails grows).
Overall, I find the quality of this book to be excellent. It's not thick to the point of being too heavy to carry around in your laptop bag, for those times when you need to peek at it, yet it covers enough of Rails to be considered a complete and authoritative reference. This is probably a testament to Rails' simplicity too.
The writing style is eminently readable. You can read it cover to cover, if you like, without getting bored. The frequent sidebars make it lively without being too distracting. A great amount of care and craftsmanship went into producing this book, and it shows.
Wenn man sich mit Ruby on Rails beschäftigt, MUSS man dieses Buch gelesen haben. Das absolute Standardwerk erklärt alles gut und übersichtlich. Vorsicht: Demnächst (1Q/2007) kommt die zweite Auflage mit vielen Ergänzungen heraus, so lange sollte man ggf. warten.
There aren't many (any) other books on Rails development currently, so this book has a sigular distinction: it's the only option.
Somewhere in this book is all the information you might need to get a good foundation going in Rails development. The writing is nice and easy on the brain.
But, the organization of the book didn't really appeal to my particular learning style. I wasn't so interested in continuing work on the very basic shopping cart app that is the "tutorial" in this book. I was more interested in things like working with complex, multi-table databases.
The book has sections devoted to Active Record, but these are often void of any working examples. There are often code snippets in these chapters, but they are free floating and out of context; in other words, the small snippets show you how something might work, but there is no place that shows it working in context.
Overall, I think this is a decent intro to Rails. But I would rather have a Peachpit Press type book, with straight forward code examples used in context. That's just a personal viewpoint, and you very well might think this book is a 5 out of 5. For me, I'll give it a 4. But I would still urge you to buy it -- it will prove a valuable reference as you find specific questions to look up.
The book takes a two-part approach to describing RoR. In the first 8 real chapters (5-12), the Daves use a gradual build-up a storefront application with incremental and increasingly complex functionality to show RoR's capabilities and flexibility. Walking through these helps you get some hands-on experience with the framework. The next 10 chapters go through the various aspects of the Rails framework and describes how RoR does its thing. Besides the core functionality, the book also covers Security, Caching and performance, and testing.
A good framework lets you do the most common things easily (do simple things simply!), while also letting you override the default behavior to implement your own logic. I appreciated this book's approach in following this flow, first showing you how to do simple things, and then explaining how to bypass or override parts of the framework's assumed formalisms.
I bought this book in tandem with the Programming Ruby book, having been away from programming for many years and not knowing Ruby at all. I would recommend that you at least get acquainted with Ruby first, but after that, it's an easy read. I developed my first basic AJAX app using RoR in little time, mainly using the book but sometimes needing to go to the web for more info.
I haven't read any other books on Ruby, but for an introduction to RoR, this one is very good.
Books on programming are often poor, using pointless examples and making unrealistic assumptions about your familiarity with the environment you're working in. This book is different. You work through the book developing a very satisfying, fully-featured application in a short time in such a way that you learn all that's important about using RoR in an agile manner.
If you run into a problem then the publisher's site has a comments/errata board and very comprehensive downloadable examples of the solution you're trying to develop at every stage. I've not tested it but I'm sure the authors would respond personally if you needed them to.
However, RoR is fast-moving. The second edition is in beta and it's very good indeed, making more use of things like Rake database migration and Ajax. I'd wait for that (or buy the beta now) if I were you.
Then you can review it yourself and give it six stars.