Looking for a modern comparison between ASP.NET MVC and MonoRail

I am coming from Ruby on Rails and I need to create a C # web application. I am currently looking at ASP.NET MVC and MonoRail. Most of the comparisons that I find date back to 2008-2009, when ASP.NET MVC was still a newbie, and most of the points against MVC were that it was too raw, not as sophisticated as MonoRail.

Well, several years have passed since then, and Microsoft worked a lot on ASP.NET MVC. How do modern versions of two structures compare with each other?

+7
source share
2 answers

I rated MonoRail about four years ago and, compared to today's mvc3, these are the main differences (imho)

  • Template engine for razors as MVC by default. It's nice to use, while the monorail defaulted to NVelocity. I checked the Castleproject website and it plans to upgrade Monorail there ...
  • Significantly more documentation for MVC3, and to this day - perhaps this is my mistake - I can not find online documentation on the Monorail website.
  • Areas, Particles, Razor are extremely integrated in VS2010. And if you do not like it, you can connect and use different templates for modeling.
  • MVC3 has better Ajax / jQuery integration, unobtrusive form validation
+2
source

I have been working with both structures over the past few years. At first we were stuck with a monorail when the mvc came out, since we felt it was raw. IMHO MVC3 is now at a point where it is more mature than Monorail 2, with better support, additional documentation and new versions coming out regularly.

  • Razor is more powerful than nvelocity and has excellent Visual Studio support, which is lacking.
  • Monorail views are not compiled compared to MVC3, which are compiled. Sometimes when developing it, it's nice to just change the look and see, and then change it right away. Compiled views, on the other hand, run faster.
  • Monorail has not been updated for some time and seems stagnant. Monorail3 works though.
  • MVC3 now also supports helpers, both in extension methods, and you can declare them directly in your Razor views. Monorail supports helpers only as static methods of an auxiliary class.
  • MVC3 has much better routing support.
  • MVC3 now has IoC support for filters.
  • MVC3 supports the application of filters to the method level, but the monorail supports filters only at the controller level.
  • MVC3 does not support Ioc out of the box, but instead you can use IDependencyResolver to do this. You can find many solutions for this.
  • MVC3 perfectly supports CSRF attacks. In Monorail, you will need to develop this yourself using a combination of helpers and filters.
  • MVC3 supports pre-compilation of views, so you can minimize errors before publishing your site. but you cannot do this with nvelocity view in Monorail as they are interpreted
  • MVC3 html automatically encodes any string. In Monorail, you always need to call an assistant for this.

When Monorail 3 comes out, though it will be interesting to see what they support. Take a look at https://docs.google.com/document/d/1AkeeJPh8kZQKtnHN3RDR3v-UfG7zt9wCL0jMiualUqI/edit?hl=en&authkey=CN7U99YN&pli=1 , which is a cost proposal for the 3 Hammet monorail.

+1
source

All Articles