Brainfart: A skinners tale

Sunday, May 14, 2006

Ruby On Rails is empowering

My birthday this year was enlivening, for multiple reasons. One of the most fun for me was the gift of David Heinemeier Hansson's Agile Web Development with Rails from my kind and generous friend Jamie. For those unfamiliar with the Ruby On Rails framework, it's a programming framework for developing web-based applications that relies on the Ruby scripting language (as opposed to PHP, .NET, or Perl, other popular net-languages) and a set of useful core functions called "Rails." It lets you quickly design, develop, and deploy database-backed web applications, and I'm finding it highly addictive.

First off, lemme (dis)qualify my stance with my programming background: I'm pretty much an amateur. Although I've done some Visual C++ programming 5 years back, it was never for production (was trying to make an isometric tiled game). My web-developer experience only reaches back about a year-and-a-half, when I started Skinyourscreen.com as a hobby endeavor. This consisted of dabbling with existing content management systems (CMSs) like Mambo, Joomla, e107, and Xoops, forums like MyPHPbb, SMF, and InvisionPowerBoard, as well as content-management frameworks like ModX, Drupal, and TextPattern. This was primarily to learn how to skin them (preferably using XHTML/CSS), but you get used to using all the little goodies included with each and appreciating the unique ways in which they approach the problem of dynamically publishing user and admin-contributed content (posts, articles, images, files, comments, etc...) over the net. All of these use the PHP scripting language to power their functions and MySQL databases to store and maintain the content.

Enter Ruby On Rails: Jamie and I have been working together on business solutions for the Life Science Nexus. Both of us have a tiny bit of web-development experience. I'm more of a templater, or graphic designer, and he is the concept guy. Trying to make concept reality has been frustrating at times, however, limited by the existing freeware or open-source solutions that exist. You can pick of a CMS, fall in love with certain features (how easily it accomodates comments, for instance) but can't get by with other features (like sluggish performance, poor plugins, or reliance upon sometimes buggy and poorly documented plugins). Eventually we realized we required custom solutions.

We had bantered back and forth for several months regarding the merits and faults of various systems for doing this, originally settling on learning PHP to accomplish our goals. Just looking at PHP code gave the the willies, though. We quickly became smitten by all the instant gratification and possible using AJAX. The simplicity and intuitiveness of web-interfaces we saw designed with these increasingly popular technologies further whetted our appetite. We also came to enjoy the business blog, productivity tools, and net-casts offered by 37Signals. Their free BaseCamp and BackPack productivity tools had much earlier become and integral part of how we work. They also happened to be the creators of Ruby On Rails.

Still, the idea of learning to code again seemed a little intimidating. With the Agile book, there was no longer any reason to hold off. And you know what? IT'S SO EASY!!! The worst parts of setting up basic apps with Ruby On Rails are all in MySQL (setting up tables, specifically). Ruby as a language is incredibly easy to learn, with simple syntax and structure that makes sense. Rails builds on this by using a convenient and quick architecture that uses a predefined application directory structure to partition specific components (known as favoring "convention" over "flexibility" - although Rails is still exquisitely tuneable). You create your app by calling a Ruby script, and then generate additional components with other scripts. Following an online tutorial, I was able to have a fully-functional To-Do list made from scratch in about 5-10 minutes, and a blog (complete with admin interface, validation, and Textile Markup language) in about 40 minutes... FROM SCRATCH!!! To me, this is incredible, especially considering my credentials presented earlier in this article.

So what's next? Admittedly, the above web setups created by following the tutorials are just the tip of the iceberg, both for my work with Jamie and for my personal hobbies. Suffice it to say, for the time being, that Skinyourscreen.com will likely undergo a radical alteration in site function - powered entirely by Ruby On Rails.

For more information, please consider the following resources:

1 Comments:

  • Yahh. I like RoR more and more.

    By Anonymous Anonymous, at 1:56 AM  

Post a Comment

<< Home