Rails, say hello to .NET.
IronRuby went 1.0 at April 12th, and it runs Ruby on Rails for real. I demonstrated it myself to a packed room of (mostly) .NET developers at Community Day. There was a lot of buzz around IronRuby more than two years ago – back then, the hype around Ruby on Rails was at its peak and the .NET developers wanted in. It took a lot longer for IronRuby to go gold than many of us had hoped, and meanwhile ASP.NET MVC made its entry. Many ASP.NET developers were aware that the “webform” abstraction with its events, viewstate etc. is leaky and broken, and when Microsoft finally presented this “official” alternative to webforms they rallied to it and rejoiced, for now they had their own Rails-clone, but with a proper programming language and thorough IDE-support.
My presentation compared ASP.NET MVC to Ruby on Rails. The conclusion is ambiguous. I thought I’d be able to crush ASP.NET MVC with the pure greatness of Ruby and Rails, making it obvious to everyone which was the better framework and language. While Rails do support a lot things that ASP.NET MVC is nowhere near of having, the latter does – at least with the recently released version 2 – have the central elements of a proper MVC framework in place. What’s more surprising is that C# 4.0 is so much less clunky than C# 1.0, so in some comparisons of syntax Ruby is not even the obvious winner when it comes to readability. Take this example:
Before LINQ, C# would have never been able to map a collection in a such an elegant manner. In my biased opinion, I still find the Ruby version prettier and more readable, but the fact is that C# is not that far behind. It’s another syntax paradigm for sure, but it’s compact and it’s readable – that’s not bad at all.
So I understand if Ruby and Rails doesn’t have the appeal to .NET developers now as it had a few years ago – back when they where stuck with C# 2.0 and broken webforms. That said, there is of course no doubt that our favorite programming language, framework and community has a lot to offer anyone brave enough to try it out. Previously that required .NET developers to get involved with foreign things such as Apache server and perhaps even Linux servers (!) if they wanted to deploy their Rails project – but with IronRuby and the very cool Rack-implementation for IIS7 it is now painless to run Rails and other Ruby web frameworks (such as Sinatra) on a Windows server. And even better, seen from a .NET developer’s perspective, it’s as easy as pie to call into the .NET framework and custom .NET libraries from Rails:
IronRuby is also good news for Rails-developers. It opens up the the market for selling Rails-applications to al the companies engaged to Microsoft-technology and the .NET platform, and heaven knows there’s a lot of them here in Denmark. We can develop the sites locally on our beloved Macs using SQLite or MySQL as a database, and then deploy to Windows to run on IIS7 and SQL Server – all thanks to Rack and ActiveRecord.
I’m exited about IronRuby, and I hope some of .NET developers in the Microsoft companies are too. If you need any help getting up and running with IronRuby on Rails, just let me know.
Hello, I'm Casper Fabricius. I have developed for the web for 10 years, and have been enjoying Ruby on Rails for the past 5.
My experience covers communities, shopping solutions, multi-language sites, heavy back-end lifting and a wide selection of more traditional websites. I like to integrate Ruby with Java and .NET through JRuby and IronRuby when it makes sense. I am passionate about test- and behavior-driven development, but at the same time I am pragmatic and believe in getting things done.
I live in Copenhagen, Denmark, where I work for a fantastic company: Podio. I do not currently take on freelance assignments.