MVC App With Module Support

Feb 1, 2012 at 3:19 PM

Hey folks,

I'm building an app which I want to have support for downloadable modules and have run into a few roadblocks with the views. Naturally, this project came to light when trying to Bing a solution together.  Because the modules don't exist at compile time (and folks should be able to create their own), we are crafting a set of standard module interfaces that could be used - in conjunction with compiled views/controllers - to describe the "package" and allow development external to the core project.  These modules/packages would be loaded dynamically at runtime through an admin interface (and later at startup through a plugins directory).

If anyone has any insight into doing this module/app/package type approach with precompiled views I'd appreciate any insight. I'm not seeing too much of this in the MVC space right now (Orchard comes to mind, but I haven't examined their package/plugin approach).

Cheers.

Coordinator
Feb 1, 2012 at 5:33 PM

I think that should be possible. If you look at the samples in the RazorsGenerator sources, it shows one case of precompiling some views in a library, and then use that in a different MVC app. Look under samples\PrecompiledMvcLibrary, and how that library is being used from samples\MvcSample.

Coordinator
Feb 1, 2012 at 5:38 PM

This seems closer to the idea of portable areas which does work pretty well with RazorGenerator.Mvc. Like Ebbo said have a go at it, if there's something that needs to be done to make your workflow simpler, feel free to start a new work item or better yet send a pull request :)

Feb 2, 2012 at 3:17 PM

Great, thanks gents.

I had looked at portable ideas and thought that was pretty close, but wasn't sure if I could mux that with RazorGenerator, so that gives me something.  I'll see what that workflow is like and will be happy to give my feedback and fork.

Cheers.