twitter
    musings about technology and software development..

A taste of Ruby and Rails

Although I've done C, Perl, PHP, and Java-based web programming in past lives, I've spent the last 8 years or so developing on ASP.Net for a living. As a result, I believed Ruby on Rails (RoR) was a toy not meant to be used for anything serious. Because it's easy to learn, people use it to build cheesy websites. But, that doesn't preclude you from building serious websites, Twitter being the standard-bearer for Rails. Here's what I can tell you: a programming language is merely a tool. And if data-driven web programming is your nail, then RoR is quite the hammer.

Here's the key difference: C developers think of a pointer as a basic building block.  C# developers think of hashtables and lists as basic building blocks.  RoR developers think of database tables as basic building blocks.  Working on SharePoint, anytime we needed to add a new database table, it was a big deal.  You had to write a bunch of CRUD operations and stored procedures.  You had to write a bunch of UI to expose the CRUD operations.  You had to write an object model.  You had to write upgraders.  You had to make sure it got backed up properly.  All of this took, on average, a month for a developer to code and unit test.  With Rails, all of this is inherent to the architecture.  You design the database schema, and all of this functionality is immediately available, freeing you from the drudgery and allowing you the time to actually design and build something useful.

You might say, well I can do all of these things with LINQ, the Entity Framework, or some third-party bolt-on solution.  And you'd be right.  But that's a bit like flying economy on a long-haul flight to Italy with a layover in London.  Oh, you'll get there, but only after much discomfort, a strained neck, and having paid extra for your checked bags.  Why bother when you can take a comfortable non-stop flight in first class -- and did I mention it was free?

Of course, it is free only in the monetary sense.  One of the main critiques of RoR is you pay a price in performance (partially because it is not a compiled language).  But if it's good enough for Twitter's billion tweets a month, I think I'll manage.  In a followup post, I will go over some of the other problems I've encountered which are not often discussed in online forums.