ASP.NET Core 1模块化(插件)体系结构? [英] ASP.NET Core 1 Modular (Plugin) Architecture?

查看:491
本文介绍了ASP.NET Core 1模块化(插件)体系结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET Core 1设计Web应用程序产品的体系结构.我希望该体系结构是模块化和插件式的.我希望每个模块都与主应用程序分开,并且可以轻松地将其打开和关闭.

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.

我找到了这个开源框架 ExtCore框架.

I found this open source framework ExtCore Framework.

任何建议!

推荐答案

它可能部分取决于您要如何部署模块.例如,假设您使用Areas,而一个模块由一个或多个区域组成,每个区域具有多个控制器.如果您打算将控制器的源代码部署到服务器,则单独使用Area可能会有所帮助,但是如果您打算部署dll,则对于可插拔模块架构,您可能需要在项目中隔离每个模块.这样每个模块都会生成自己的dll.

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.

如果采用后一种方法,则每个模块将与主应用程序更加清楚地分开.将其切换为OFF可能等于简单地从服务器中删除模块的dll和area文件夹.切换它可能只是将它们部署到服务器.进行切换可能有更好的方法,但是对于新体系结构,我不清楚.我还在学习.

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.

这篇关于ASP.NET Core 1模块化(插件)体系结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆