This is part 3, the last post in my Rails VS ASP.NET series. Please see Post #1 and Post #2 if you missed them.

In my previous post, I mentioned that I have a glimmer of hope for ASP.NET. This post is about the current state of ASP.NET, what it's doing right and, moreover, what direction I want to see it go.

The Alt.Net Movement

A community, dubbed Alt.Net, formed around providing solutions to a number of programming concepts that the .NET framework lacks. Particularly pressing is the lack of an MVC framework for ASP.NET. Fortunately, some smart developers out there cranked out a solution to the MVC problem: Monorail, a replacement for ASP.NET's out-of-the-box Webform architecture. Monorails gained a lot of popularity, but , as a 3rd party product, its adoption has been limited. I mean, most ASP.NET devs out there that I've talked to have never heard of it.

As a side note, I think it's worth pointing out here that if a ASP.NET has disgruntled enough programmers out there to the point where they've band together and created their own framework to fix/extend the current architecture, it seems like a good indicator that something is horribly, terribly wrong.

Most recently, Scott Gu announced Microsoft's solution to ASP.NET's MVC conundrum: the aptly named ASP.NET MVC, which is being bundled into the ASP.NET 3.5 Extensions library.

Yoink! We got MVC Now!

How does this play into Rails? Well, one could claim that Microsoft's implementation of the MVC pattern and associated URL routing structures are freakishly similar to that of Rails. Like really, really similar. It doesn't really bother me that Microsoft is making ASP.NET MVC mimic Rails. In fact, it's a great indicator that Rails is on the right track (pardon the pun). I just wish they'd go a bit further and implement the concept of Rails Partials and also extend the Microsoft Ajax Javascript Extension library to be more like Prototype.

Hmmm... Why Use ASP.NET?

If you've done much Rails development, you'll quickly discover that the majority of Rails developers out there use a Mac as their development platform and TextMate as their preferred IDE. I recently joined this bandwagon, and I will admit that it's a pretty sweet set up. Damn you, Apple, for making your MacBook Pro's so attractive!

Anyway, so one thing that sucks about Rails development, especially if you're just learning, is you don't have access to the all-knowing Intellisense to help you along. The latest versions of Visual Studio, and by that I mean 2005 and up, have some very kick ass, easy-to-use Intellisense that helps out not only with .NET code but with CSS and Javascript. Of course, TextMate has the concept of Bundles, which are very powerful, but basically require memorization of Hotkeys to be useful. There's also the NetBeans IDE for Rails, which has some decent Intellisense, but nothing on par with Visual Studio's.

Another thing .NET has going for it is its immediate availability of "Enterprisey" level things, such as message queuing and transaction scopes. It's also great for working with old Com Objects and the like (*shudder*) This comparison post has more details on the subject.

Another situation in which Rails would be a weak choice: say you need to create a new web app that talks to an old legacy database. The Rails ORM, ActiveRecord, is built around the assumption that your database will be created in parallel with the Rails application and follow a strict set of naming conventions. You're going to run into some major setbacks if you try to use Rails for this scenario. However, with ASP.NET, you can easily use ADO.NET to handle this problem much more quickly and efficiently.

I certainly won't claim to know every situation in which one framework might is better suited than the other. Leave a comment if you can point one out!

Rails Vs. ASP.NET Wrap Up!

I could keep going on this subject, but I'm going to stop myself here. I've talked a lot about the problems I've experienced with ASP.NET and a number of the reasons why I believe Rails is currently a far superior web framework. If I had to slim it down to 3 reasons why Rails is better, they would be:

  • Integrated ORM
  • Convention over Configuration
  • Integrated Javascript Library

If you're currently a hardcore ASP.NET dev, like I used to be, I greatly encourage you to take a look at Rails and play around with it a bit - I guarantee it will be an eye-opening experience. Actually, you might not want to; once you get a taste of Rails, you'll likely not want to go back!

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):