I first started looking at Rails and Ruby a little over a year ago, but haven't touched it since then. Recently I decided to get back to it and therefore dug out my copy of "Rail Space", which I have had for a while but had forgotten to review. Oh, well, better late than never.
"RailSpace" is a tutorial that leads you through building an imaginary application with Ruby on Rails ("ROR" from now on). At the very beginning, the author leads you through installing ROR on Linux, Mac or Windows. Mac OS X 10.5 (Leopard) comes with ROR setup and ready to roll, so I was able to skip that. I have done it on Linux and on my Mac prior to Leopard; that part certainly isn't difficult.
The only difference for an OS X Leopard user is that the book assumes you will be using MySQL as the backend database; Leopard has Sqlite3 as the default. For everything but the raw database examples, it makes absolutely no difference, but you certainly can install MySQL if you want. Just to convince myself that Ruby really doesn't care I did that, and did one project with MySQL and one with the default Sqlite3 - it really makes no difference.
After the installation, "RailSpace" does a pretty good job of introducing you to ROR, though I think it shares the same fault as just about everything else I've read on the subject: it doesn't give a good, concise description of how everything fits together. Instead, we get things like this:
..the only real way to understand the MVC architecture is to absorb it by osmosis...
I've seen the same thought expressed in just about every ROR book and article I've read, and it's complete nonsense. Anyone who has ever created a medium size website certainly should understand the concept of separating content from presentation, and that's the basis of ROR's MVC (Model, View, Controller). Your raw content will be under "views", definitions and code will be under "controllers", and "models" defines database data. The only other thing you need to understand before starting in is "migrations", which is simply ROR's version control system for your database.
"RailSpace" builds its application slowly, modifying it as the chapters go along. That's an excellent way to teach, because in the real world we constantly modify our websites, adding new features, restructuring, redesigning: you might as well learn how to do that in ROR from day one, and this book takes exactly that approach. I like that much more than presenting a finished product block by block.
By the way, the source code for this (and some sample chapters) are all on-line at http://www.railsspace.com and it includes the intermediate steps, so it's very easy to follow along without a whole lot of typing.
Update: That site seems to be dead.
I liked also that the project paid attention to both looks and ease of use without clouding up with too much detail. The design is simple, but with enough attention paid to presentation to understand how to accomplish that in ROR, and the same is true for niceties like data validation: they do enough to show the concepts without burying us in it.
The authors also included deliberate mistakes - that is, design deficiencies which you might notice before they get around to pointing out the problem. That's good too, because often the best way to understand why you need to do something this way is to see what happens when you don't.
My longer term intention with ROR is to redesign this site under its control. I feel that ROR is just what I've been waiting for: something that gives me a lot of built in capability, but doesn't restrict my own creativity. I think this book (and surely others) will be helpful as I stumble along toward that goal.
Order (or just read more about) RailsSpace from Amazon.com
Tony Lawrence 2007-11-25 Rating:
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Anthony Lawrence © 2011-03-12 Anthony Lawrence
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. (Robert Firth)