How to develop a Pluggable/Installable Module Based Application in ASP.net/ASP.net MVC
I am desiging the architecture of an application which will have many sub applications in it. Those sub-applications will be a developed by us but on a later stage.
I want to create those sub-applications as installable plugin / module which might have multiple pages (.aspx pages) which should be able to interact with the Main Core Application and consume its shared data also.
I strictly need The Plugins/Modules to be installable by manipulating the configuration or adding a folder of files or a DLL.
My Application will开发者_Go百科 be an ASP.net web application. If ASP.net MVC solves the purpose then I can also look up for that also.
My Application will make use of URLs to Identify the Module to be loaded. Following are some Examples of some URLs which I wish to have my application.
e.g.
http://www.myCoreApp.com/Module1/
http://www.myCoreApp.com/crm/
www.myCoreApp.com will host my Core Application in which my Modules will be installed.
Module1, crm, accounting and xyz are installed modules on My Core App.
You should take look at MEF (Managed Extensibility Framework). It makes no difference if your app is ASP.NET web forms or MVC, or even if is Winforms
I would go for MVC.
One could auto-discover the modules --- probably by convention and by checking implementation of a certain initialization type like IModule.
Then you could register your Controllers within a DI container (like Windsor) so all the 'shared' components will be injected by the container.
HTH
精彩评论