Asp.Net MVC vs Castle MonoRail

Vorleak Chy picture Vorleak Chy · Nov 14, 2008 · Viewed 9.6k times · Source

I've some experiences on build application with Asp.Net, but now MVC frameworks become more popular. I would like to try building new multilingual web application using with Asp.Net MVC or Castle MonoRail but I don't know which one is good for me. I don't like the web form view engine, but I like routing feature in Asp.Net MVC.

  • Could anyone tells about pros and cons between those?
  • Which ViewEngine is the better as well for overriding the master template?

Answer

Julian Birch picture Julian Birch · Feb 3, 2009

Speaking as an advocate of monorail, I've got to say you should probably go for ASP.NET MVC. To be honest, the simple fact that ASP.NET MVC is going to become the default architecture within three years should probably swing it. This equation was different a year ago, simply because the default architecture had serious productivity problems compared to MonoRail.

If you want to talk technical advantages and disadvantages:

  • ASP.NET AJAX is a mess (avoid it), but they've now got jQuery. In fact, the jQuery support is better than any other environment. Of course, you only fully get that with IDE integration with the standard view engine.
  • There are some aesthetic improvements (for instance, the way model information is passed around is much cleaner and more obvious than Monorail).

Also, don't dismiss the standard view engine out of hand. You don't have to throw controls at it like you did with ASP.NET, you can code it in a pretty similar manner to Brail, only using C# instead of Boo.

There are things that are just plain ugly * the number of methods that take object for a parameter. Good luck finding the documentation on what exactly they expect. * Microsoft's fondness for abstract classes over interfaces. They have their reasons, but I still dislike it.

Also, in many ways, MonoRail remains the more complete platform. There's no abstraction for validation or paging in ASP.NET, for instance. Also, there's not really any help for binding to a model. The helpers have very little functionality compared to their Monorail equivalents.

Overall, though, I think ASP.NET MVC is a winner.