Migration Approach from ASP.Net MVC to Orchard

Jan 29, 2011 at 6:08 AM
Edited Jan 29, 2011 at 6:18 AM

I am sure I may not be the only one feeling little overwhelmed while looking at the Orchard. While over all premise and the way it is developing is indeed an enticing prospect, for some one only familiar with asp.net MVC, there is still a fairly steep learning curve here. the content parts, types, shapes, handlers, drivers et all are confusing.

In my case i am looking to move my MVC based app into Orchard, and i been struggling along what should be changed to make full use of Orchard framework. For example: does the MVC Action method approach has to be changed here?, Should the (partial) views be done differently ?,  what should be done to MVC Views to avail globalization features etc...

If someone from the orchard team or community could drop hints on what in asp.net mvc maps to orchard concepts, it would be relatively easy for new folks to get upto speed quick and be active in here.

I know it could be pretty huge ask if a definitive migration doc has to be prepared, i am only asking for hints and I would document the steps as I fully integrate my application into orchard and publish in the forum here.


Thank you!

PS: I did refer to How Orchard Works (http://orchardproject.net/docs/How-Orchard-works.ashx) and other notes under the documentation tab but those are still fair shot away from conveying how to move an MVC app to orchard.

Jan 29, 2011 at 6:16 AM

A good first step may be to transform your project into an MVC area, add a manifest and copy that into the Modules subfolder of the web site project. You'll need to move the route definitions from global into Routes.cs. That should pretty much work but you're not yet integrated. A next step could be to mark your controllers as themable and strip down your views of master-page kinds of layout in order to let the theming engine of Orchard take over. At this step, you are pretty much in the state you'd reach by following the Hello World tutorial (http://orchardproject.net/docs/Building-a-hello-world-module.ashx).

Next steps could be to start taking advantage of the content item infrastructure by creating your own content types, parts and fields.

I suppose we should have a first steps document such as this that starts with a plain MVC app and walks you through moving it to Orchard. We do have this document if that helps: http://orchardproject.net/docs/First-steps-into-Orchard.ashx

Jan 29, 2011 at 1:51 PM

I am pleasantly surprised! that was really quick  - 2 minutes to be precise!!! :) Thank you Bertrand :)

Jan 29, 2011 at 11:07 PM

You just got lucky ;)