Web Development

Ruby Isn't Just for Tuesday Anymore, or Big Doings with Little Languages

By Jonathan Erickson, July 30, 2008

Ruby just isn't for Tuesday anymore. It's a 24/7 programming tool that's finding it's way into large organizations.

When it comes to web development, AJAX didn't change everythingit just seems like it did. By delivering to users the responsiveness of native applications and providing developers with a better UI and standardized data retrieval, AJAX ushered in a more interactive and rich web experience.

And in the spirit of imitation being the sincerest form of flattery, the word around the lunchtable at this year's RailsConf conferenceproving once again that software developers can talk and chew sandwiches at the same timewas that Microsoft will be rolling out a Ruby-based AJAX look-alike called "ARAX" (short for "Asynchronous Ruby and XML") and the Python based "APAX" (short for "Asynchronous Python with XML". With ARAX and APAX, developers who prefer Ruby or Python can build AJAX-like applications without having to deal with JavaScript.

Of course, ARAX and APAX aren't Microsoft's first foray into the world of little dynamic languages that do things at runtime other languages do during compilation. IronRuby (www.ironruby.net) and IronPython (www.ironpython.net) are .NET implementations of Ruby and Python, respectively, that leverage Microsoft's Dynamic Language Runtime (DLR), a subset of .NET's Common Language Runtime (CLR) that provides shared language services, such as frameworks, libraries, and tool integration. However, the DLR adds features to the CLR that specifically address the needs of dynamic languagesa shared dynamic type system, a standard hosting model, support to generating fast dynamic code. In the process, dynamic languages like Ruby and Python (among others) can freely share code with each other, as well as with static languages like VB.NET and C#. IronRuby is designed for building server-based applications that run on top of ASP.NET or ASP.NET MVC, as well as building client applications that run on top of WPF or Silverlight. You can also run Ruby code inside your web browser and have it interact with Ruby code that's on your web server. That's pretty cool.

Microsoft isn't the only outfit fooling around with dynamic languages like Ruby. As it turns out, Yahoo! provides a Ruby interpreter in its BrowserPlus software (browserplus.yahoo.com). According to Yahoo!, BrowserPlus is "software that extends the capabilities of your web browser to make richer web experiences possible." (Hmmm, sounds familiar.) "Different websites can use BrowserPlus to support things like drag and drop from the desktop, easier file uploads, more efficient and secure acquisition of feeds and information, and native desktop notifications...so that developers can build more exciting web applications and so end-users can get more done inside their web browser." Actually, this does sound interesting. (And no, Microsoft couldn't possibly have wanted Yahoo! for BrowserPlus-like technology alone. No, no way...)

Not to be outdone, Sun Microsystems is also in the dynamic language fray with its NetBeans Ruby plug-ins (wiki.netbeans.org/Ruby) that provide an IDE for building, running, testing, and debugging Ruby and Ruby on Rails applications. You can download a Ruby-only version of the NetBeans IDE 6.0 or add Ruby support to a NetBeans IDE 6.0 download.

Of course, one place you'd expect to see Ruby pop up is in the world of web servicesand you won't be disappointed. Amazon Web Services (developer.amazonwebservices.com), for example, has embraced the language by supporting Ruby interfaces from RightScale to Amazon Web Services (AWS) such as Elastic Compute Cloud (EC2), Amazon Simple Storage Service (S3), and Amazon Simple Queue Service (SQS), among others. And then there's Ruby/AWS (www.caliban.org/ruby/ruby-aws), a Ruby language library written by Ian Macdonald for access to Amazon sites via the AWS API.

But little languages like Ruby, Python, Lua, REBOL, and others have things in common other than they're dynamic. Almost all of them spring forth from the genius of a single individual (or two)Ruby from Yukihiro Matsumoto, Python from Guido van Rossum, Lua from Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. And I'd bet that David Betz has cranked out a dynamic little language or two. Another thing these dynamic languages have in common is that their adoption by large organizations have been from the bottom-up, not top-down. For instance, it was Nokia developersnot managementwho pushed Python into the official toolchain, while over at Microsoft, John Lam has almost single-handedly brought Ruby to Redmond. The bottom line is that it is people, not products, and individuals, not corporations, who are changing the face of software development. Give a smart person a little leeway, and you'll be amazed at the results.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!