ASP.NET MVC 中类似 Wordpress 的插件模型

发布于 2024-09-25 23:24:35 字数 514 浏览 0 评论 0原文

这是基于这个问题

我目前正在考虑从头开始重建我们公司的内联网(老实说,我们现有的内联网绝对是一团糟),但我想要的新内联网的核心“功能”之一是能够将整个应用程序(十有八九可能在 MVC 中,另一个是标准 Web 表单)构建为向核心提供附加功能的模块,或者在核心内创建一段新应用程序的模块(例如,如何Joomla 做到了),只需将它们插入到核心应用程序中,一旦完成,将它们放入一个目录中,并且在某些时候能够从管理界面启用和禁用它们。

我现在正在研究 MEF 并试图理解它,尽管我也在研究 MvcContrib Portable Areas,并想知道这是否是我正在尝试做的事情的可行替代方案。

我只是想知道这是否是尝试让我到达我想要的位置的最佳选择,或者我是否打算使用 MEF 作为提供此功能的元素完全错误?

我什至可以在 MVC 中做我想做的事情吗?

This is kind of based off of this question.

I'm currently looking at rebuilding our company intranet from the ground up (I'll be honest, our existing one is an absolute mess), but one of the core "features" of our new intranet that I'd like is the ability to build whole applications (which will also probably be in MVC 9 times out of 10, the other being standard webforms) as modules that provide additional functionality to the core or a module that creates a while new application within the core (for example, how Joomla does it) that just plug-in to the core application by say dropping them into a directory once they're completed, and at some point be able to enable and disable them from an admin interface.

I'm looking at MEF and trying to get my head around it at the moment, although I'm also taking a look at MvcContrib Portable Areas, and wondering if that's a feasible alternative for what I'm trying to do.

I was just wondering if this was the best choice for trying to get me to where I want to be or am I going about using MEF as the element to provide this function completely wrong?

Can I even do what I'm trying to do in MVC?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

混浊又暗下来 2024-10-02 23:24:35

我个人更喜欢 Portable Areas,但也可以看看 Codeplex 中的 Orchard 项目。他们有一个非常有效的插件机制,尽管有些复杂。这完全取决于您期望插件作者对核心应用程序有多少“知识”。

My personal preference is Portable Areas, but also have a look at the Orchard project in Codeplex. They have a very efficient plug-in mechanism, though somewhat complex.. It all depends on how much 'knowledge' of the core application you would expect authors of the plugins to have.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文