Migrate an existing MVC web Application into Orchad Or build it from scratch?

Topics: Administration, Customizing Orchard, Writing modules, Writing themes
Dec 20, 2012 at 1:22 PM
Edited Dec 20, 2012 at 1:23 PM

Dear,,

Before I am going to ask my primary question I want Orchad experts to tell me which is more easy and productive to start an MVC and migrate into Orchad? or to directly start with Orchad then build my MVC application? if the second choice is the best how to do it?

Now, my question is how to migrate an existing MVC app into Orchad?

Best

Dec 20, 2012 at 1:34 PM
StudioIn wrote:

Dear,,

Before I am going to ask my primary question I want Orchad experts to tell me which is more easy and productive to start an MVC and migrate into Orchad? or to directly start with Orchad then build my MVC application? if the second choice is the best how to do it?

Now, my question is how to migrate an existing MVC app into Orchad?

Best


You can integrate all of your existing MVC app feature into Orchard modules.

Dec 20, 2012 at 1:44 PM

Ok? and this could be done by ... ?

Dec 20, 2012 at 3:12 PM

The best choice is to start with Orchard and save yourself the work of converting your MVC app into an Orchard module. Orchard has specific conventions for how to do things like data access, and you'll be wasting time if you build as MVC and then convert into an Orchard module. I actually did go the route of building an MVC app and then converting to Orchard, but at the time we didn't know we'd need a CMS. 

"if the second choice is the best how to do it?" Read the Orchard docs, or follow skywalker's tutorials. Basically you will clone Orchard source code, then you will build a module. All your code will be inside that module. That is the simplistic way of looking at it. You may actually build multiple modules if you want to organize the code for separation of concerns. 

 

How to migrate existing MVC to Orchard? This question has been asked before, here as well as on StackOverflow. Have you research those answers? 

Dec 20, 2012 at 8:41 PM

You have to also answer for yourself: how much Orchard do you need? ;) Do you want to embed your logic/view into CMS "frame" or integrate also on content type/DB access level. Every Orchard module is MVC Area, so you can put in it Route/Controller/View and render you page. This will be somehow hybrid approach Orchard + MVC module. You can also go whole Orchard's way and define all Orchard specific classes: migration, content type, driver etc and take advantage of all CMS' goodies.

Dec 22, 2012 at 7:33 AM

Thanks you TheMonarch, I understand from your reply that I have to copy the Orchad source code and open it through visual studio then create my own modules. Do I miss any thing? please advise!

 

best

Dec 22, 2012 at 1:51 PM

Sounds right. Look at docs.orchardproject.net, it gives info on how to create a module.