问题
I'm designing an architecture for a web application product using ASP.NET Core 1. I want the architecture to be modular and plugin. I want each module to be separated from the main application, and can be easily toggled ON and OFF.
I found this open source framework ExtCore Framework.
Any Recommendations!
回答1:
It may partially depend on how you want to deploy your modules. For example, let's say you go with using Areas, and a module is comprised of one or more areas which have several controllers each. If you plan to deploy the source code for the controllers to the server then using Area's by themselves may be helpful, but if you plan to deploy dlls instead, then for a pluggable module architecture you will probably need to isolate each module in it's on project so that each module produces it's own dll.
If you go with this latter approach then each module will be more clearly separated from the main application. Toggling it OFF could amount to simply removing the module's dll and area folder from the server. And toggling it on could be just deploying these to the server. There are probably better ways for doing the toggling but I'm less clear on that with the new architecture. I'm still learning it too.
来源:https://stackoverflow.com/questions/36154649/asp-net-core-1-modular-plugin-architecture