Rich Tracks
 Tuesday, January 08, 2008

ASP.Net MVC Framework Vs. Ruby on Rails

I just got back from a presentation by Scott Hanselman all about ASP.Net MVC.  I want to share not only a pessimistic prediction coming true, but also my optimistic views on ASP.Net MVC.

Rails is another MVC (Model View Controller) framework which most commonly uses Ruby as the programming language, hence the term "Ruby on Rails". Back in early 2007, I learned me some Ruby on Rails and got some great crash course experience creating a rather complex web app for an actual paying client. That sure was fun.

I fell in love so quickly with certain concepts of Rails and features of the framework that I came to an inevitable conclusion: Microsoft is so gonna copy this.

After seeing both of Scott Hanselman's recent presentations on ASP.Net MVC, I created this comparison (Table 1) between ASP.Net MVC and Ruby on Rails, at least the way I see it at this point. This includes what I've seen with my eyes as well as what I know MS is going to think of before they release it. It's pretty unscientific really, but check it...

Table 1:
  Ruby on Rails ASP.Net MVC
Pretty Much Everything
Ruby on Rails has

But anyway, now for the optimism. Here are some reasons I think ASP.Net MVC is going to be a great thing:

  • Like Silverlight, .Net developers will have another tool at their disposal which does something very similar to other existing tools, but with much less of a learning curve. This may sound like an underhanded compliment, but it's true.
     
  • Conversely, this framework will reduce the learning curve for those coming into ASP.Net from platforms such as Ruby on Rails, PHP, and Java. It's kinda old-skool thinking, but in a nu-skool way. Ignore the fact that the last sentence didn't make any sense at all.
     
  • The framework allows what Scott calls "separation of concerns", which actually means a lot more in ASP.Net MVC than it meant back when ASP.Net 1.0 was released. It means that your presentation, logic, and data layers need not know anything about one another. If you don't know what this means, it's much too lengthy an explanation to post here, but I assure you it's nifty.
     
  • Remember cursing the advent of postbacks, viewstates, and only being able to have one form tag on any page? ASP.Net MVC gets rid of these things inherently. You can have as many forms as you want, as you completely control the output (unless you keep using the old Web Controls, but you don't have to). The perceivable downside is that you have to handle posts and events by hand, but to some, that's not a bad thing (think AJAX). One huge upside is that it's super easy to change the output based on what device or platform is making the request (think cellphone, AJAX, etc).

#    Comments [1] |
Thursday, January 10, 2008 11:01:46 AM (Pacific Standard Time, UTC-08:00)
This is good news for .NET developers. I'm really glad to see the Rails ideals making their way into other modern development solutions. I will say I'm hardly fan of Silverlight, but that's another show.

One thing you don't really mention here that I'd love to hear you comment on is the model layer. I've heard terms like LINQ and BLINQ and possibly FINQ thrown around but I'm not really sure how those tie in to web applications.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, em, i, strike, strong, sub, sup) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview