3

I need help on developing an ASP.net MVC4 application with pluggable modules approach. I tried to use Areas for this but this is not very handy to use with plugging two different solutions. My target is to develop a module app (A) that can be pluggable to any other web applications (X,Y,Z).

I need some guidance to achieve this.

Thanks

3 Answers 3

1

You could take a look at the following guide which illustrates how you could embed Razor views as resources in class libraries. The idea is to write a custom VirtualPathProvider which will be able to serve your views from non-standard locations (such as views embedded in other assemblies).

And here's a sample application which is using the RazorGenerator library.

Sign up to request clarification or add additional context in comments.

Comments

1

You can use mef we use mef in enterprise appplication.

The Managed Extensibility Framework (MEF) is a composition layer for .NET that improves the flexibility, maintainability and testability of large applications. MEF can be used for third-party plugin extensibility, or it can bring the benefits of a loosely-coupled plugin-like architecture to regular applications.

3 Comments

I'm not sure how views in asp.net mvc could be modelled via MEF. Of course you can compile your controllers/actions in a dll and then plug it in, but they won't have a good way to actually display any content.
Of course you can. Still not clear how asp.net mvc views could be modelled even with use of multiple projects.
Nothing wrong with having your views and other content (js, css, img) accompany your dll, this will allow one to tweak the presentation after the module has been deployed. Or you can compile your views into the dll.
0

This looks to be a way to do it.

http://geekswithblogs.net/cokobware/archive/2013/01/15/asp.net-mvc-4-pluggable-application-modules.aspx

It also looks like it can be further extended to work well with Nuget.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.