سؤال

I have a large Monorail project that we have decided we are going to move over to ASP.NET MVC. Most of the underlying system will likely be reusable, but the Controllers will of course have to be rewritten, and proabably at least some of the views.

It strikes me that a low risk avenue for this is gradually convert well defined sections of the system to MVC, and perhaps as MVCContrib Portable Areas. Does anyone know if there are any non-obvious gotchas that I am likely to run into with this approach?

Thanks for your input, Matthew

هل كانت مفيدة؟

المحلول

Off the top of my head:

  1. Be careful with routes. MonoRail controllers should be excluded of ASP.NET MVC routes, and viceversa.
  2. You won't be able to use helpers in general to link from MonoRail to ASP.NET MVC (or the other way around). E.g. no <%= Url.Action("someaction") %>
  3. Layouts are incompatible in general. Unless you use the Brail or the NVelocity view engines in ASP.NET MVC, but even then I don't think it will "just work".

About 1. and 2. maybe you can find some way to hack MonoRail and make it compatible with System.Web.Routing, but it doesn't work out of the box.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top