Ruby on Rails has become the poster child for cool in the server development world. Several months ago, hoping to find out what all the excitement is about, I installed Instant Rails, a nice all-in-one web server package and checked it out. As you probably know, I’m a Flash guy so I prefer developing for the front end. Even so, I quickly discovered that people had good reason to love RoR as much as they do. It’s beyond easy to work with and it’s a lot of fun!
Recently, I received a copy of Ruby on Rails: Up and Running a thin little book by Bruce A. Tate and Curt Hibbs. It had been a while since my initial discovery of RoR, and I wanted to learn more. Coming in at a mere 167 pages, I didn’t mind sitting down to read this book. Seriously, it’s a super-thin book, and I think many people might pass it up because it looks useless. However, I found that the authors crammed a ton of knowledge into every page.
A warning: This book assumes that you aren’t a programming newbie. It does not contain any introductions to the Ruby language or Object-Oriented Programming. It covers the basics of the Rails framework–enough to cause some damage–and that’s it. If you think RoR sounds pretty cool, but you don’t know Ruby, I would recommend checking out an online book, Programming Ruby: The Pragmatic Programmer’s Guide, first. It’s free and packed with information. Ruby is a bit different than other languages that you might be used to like C, Java, or Actionscript. That can be disorienting at first, but once you pick it up, you’ll be golden.
The first chapter covers the very basics. You’ll get InstantRails, the “one-click” web server I mentioned earlier, all set up. The authors examine the structure of a Rails project, and they show you how Rails provides all sorts of scripted generators to make file creation fast. You’ll look at the built-in Model-View-Controller (MVC) layout, and work a bit with the Controller and the View.
Over the next couple of chapters, you’ll learn about ActiveRecord, an exciting way to work with and abstract your database from the application. The authors show you some naming conventions that Rails naturally understands for connecting your classes to database tables. Similarly, some built-in functions provide ways for you to create relationships between your classes that match your table relationships.
The third chapter introduces scaffolding. In the early stages of the development cycle, you often need to put together simple interfaces so that you can interact with your application. Generally, these will be scrapped later for the final design. To make up for this lost development time, Rails provides scaffolding to build these temporary pages for you. It’s easy to replace these pages when you’re ready, or you can even ask Rails to give you the code it generated so that you can flesh out and build on top of the scaffold.
Before going into a chapter on unit testing, the authors show how to work a bit more with views. These are the actual displayed webpages. They cover things like templates for things like common headers and footers and functions for including stylesheets, images, and links (to generate properly structured URL for you). After that, you’ll discover an entire chapter on AJAX including built-in techniques for drag-and-drop, data filtering, and content replacement.
The holiday break is a perfect time to cross-train in other languages and work on fun projects for which you don’t normally have time. If Ruby on Rails is part of your to-do list, consider picking up Ruby on Rails: Up and Running. Merry Christmas and happy coding!
Yeah man get into it! and when you go to set up a site I seriously recomend you look at Mongrel (http://mongrel.rubyforge.org/) Its really stable and if your a windows freak like me its well supported, with a windows service wrapper. And then you can get Flex remoting with WebOrb for ROR!!! Kewl.
Hey Josh,
Thanks for the recommend. The book was pretty good. It was a nice refresher for me, since it had been a while since I last touched Rails. I’ll definitely be giving this one a second read.
Good to hear, Frank. I’m glad you enjoyed it.
Pingback: Jump into RoR with ‘Rails Solutions’ » Zeus Labs