Poetry of Programming

Its about Ruby on Rails – Kiran Soumya


Web 2.0 on Rocket Fuel

Ruby on Rails 1.1 is described as Web 2.0 on Rocket Fuel.

The much-anticipated new version 1.1 of Ruby on Rails hit the streets with fanfare a couple of days ago. And while even I am wary of the hyperbole that sometimes surrounds Ajax and Web 2.0, I’m very pleased to say that Ruby on Rails is the genuine article. Rails has become one of the real success stories in Web development in just the last year. Built by 37signals’ charismatic David Heinemeier Hanson and a host of contributors, Ruby on Rails has ascended to near-mainstream status nearly overnight.

For those of you not familar with Ruby on Rails, and a lot of you won’t be or have just barely heard of it, Ruby on Rails is a complete, open, and free application stack based on the Ruby programming language . This means it provides a complete solution for creating great online Ajax-based software of the kind that’s pouring out on the Web these days . Rails includes advanced Ajax support, Web services, an amazingly taut and clean model-view-controller implementation, and automatic object-relational mapping. Rails even includes seamless script.aculo.us and Prototype integration, as well as support for just about any database you will need.

Ruby itself is one of the interesting stores in software development lately because it’s a dynamic language, meaning that it isn’t compiled and is somewhat more akin to Perl and Javascript than a traditional hardcore language like Java or C++ . But that’s where similaries to Javascript end since Ruby is an elegant object-oriented language designed to make programming easy and make routine software development tasks almost effortless. In fact, when I did my C#, Java, and Ruby Web services development comparison last year, Ruby won hands down in development time, compactness, and generated by far the most readable code, even though it was the very first time I’d used it.
Ruby on Rails 1.1

Rails is a natural extension of these concepts in that it adds a framework to Ruby to make it maximally easy to build Web-based online software, with the single-minded intent of pushing complexity out to the edge cases. To get a sense of how powerful Ruby is, my recent discussion (video here) with David Heinemeier Hannson at Real-World Ajax revealed that 37signals not only built their 5 world-class online applications purely with Ruby on Rails, but they support almost 400,000 users on just 13 servers.

Dion Hinchcliffe and David Heineimeier Hansson discuss Ruby on Rails 1.1But there are dozens and dozens of Web development products out there, many of them very good, so what makes Ruby on Rails so special? One is that the Rails’ design focuses on trying to make the common Web development tasks fall-down-the-stairs easy, and it invariably succeeds. Like the Rails home page says, “Ruby on Rails is an open source Web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.” Rails proponents are reknowned for their plain spokeness and directness and the result of this attitude is clear throughout the framework.

Another real advance in Rails is the fact that it considerably reduces something called abstraction impedance. Abstraction impedance is a fancy $20 phrase that describes the barrier that exists when crossing from one way of thinking to another. Say the barrier of going from objects to databases, or Javascript to Ruby. Abstraction impedance is a productivity killer that sucks up programmer time doing things that don’t matter to what the application does. So instead of providing solutions to your users, you’re spending time converting information from one form to another. Rails makes this go away by giving the programmer plain old objects to deal with, no matter if you’re dealing with XML, relational database data, and now even Javascript in the browser.

This takes us to the new features in Ruby on Rails. As its biggest new feature, version 1.1 actually allows you to write your browser-side Javascript in Ruby. Javascript is a notoriously finicky language that doesn’t make it easy to create sophisticated Ajax appliations and that’s why IDEs, frameworks, and tools are springing up everywhere to make it simpler. Now Rails has just dropped one more complexity out of the process of building Web 2.0 software applications with RJS, the Ruby to Javascript compiler.

Web 2.0 software development has its own set of expectations and best practices: rapid feature evolution, real-time feature monitoring, all functionality available in both the GUI and as Web services so others can use them in their own apps, and more. Rails makes all of these easy to do using one of the highest productivity languages out there. That’s not to say Rails is perfect, it’s so new it couldn’t possibly be fault-free, but there is clear evidence today of its reliability, scalability and ease-of-use (once you get past a brief learning curve.)

What’s New In Rails: (complete list here)

  • RJS – Write your Ajax application’s Javascript in Ruby
  • ActiveRecord++ – Rails’ ActiveRecord is a powerful, automatic Object/Relational Mapping tool. It gets a major steroid boost in Rails 1.1.
  • API Support – Adding an API for your Web 2.0 software is now even easier
  • New Integration Tests – Rails understands testing and adds even more automatic test support
  • Backwards Compatibility – Even with 500 new changes, old Rails apps will almost universally run in Rails 1.1

If you’re interested in picking up Ruby on Rails, here are twelve excellent tutorials (http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials) that can get you started. And finally, if you haven’t bought all of this yet, take a look at this screencast. It shows step-by-step how to develop a working blog application in Rails from scratch in just 15 minutes, complete with comments and an administration interface. That’s the power of Rails, it really does let you focus on delivering great online software and not get mired in details that don’t matter. In any case, Rails is so new it has almost no enterprise penetration. But as the next generation of programmers uses it more and more, expect that to change, along with the way enterprises develop with Web technology.

Leave a Reply

Your email address will not be published. Required fields are marked *