7

The MEF team keep saying it is about plug-in model. So, are we talking about UI plugins? How can we use this stuff in non-UI code? I downloaded the code and the examples are all about GUI. Am I guessing it wrong?

4

5 回答 5

9

伊利亚

MEF 绝对不仅仅适用于 UI。MEF 与 UI 无关,这就是它位于 System.ComponentModel 命名空间中的原因。您可以在桌面应用程序、Web 应用程序或服务中使用 MEF。

在样品方面,感谢您的反馈。我们确实需要更好的示例来说明它是一种非基于 UI 的技术。我认为很多示例都被 UI 所吸引的原因是我们的主要合作伙伴,如 Visual Studio,正在桌面应用程序中使用 MEF。我将与团队讨论一些非基于 UI 的示例。

谢谢格伦

于 2009-02-01T08:20:59.133 回答
4

Ayende sums up MEF rather nicely here:

http://ayende.com/Blog/archive/2008/09/25/the-managed-extensibility-framework.aspx

Also the herding code lads had a great interview with Glenn Block, one of the MS MEF guys:

http://herdingcode.com/?p=28
http://herdingcode.com/?p=31

于 2008-09-26T14:30:29.107 回答
0

MEF 似乎更倾向于扩展应用程序的功能。在我们的应用程序中,我们一直在研究 MEF 是否允许用户使用不同版本的评级引擎。这些模块没有 UI。它可以添加 UI 功能,但这不是必需的。

于 2008-12-06T08:21:30.317 回答
0

If you're talking about Microsoft Managed Extensibility Framework then no, it's definitely not just about UI.

By doing something visual in the samples you just make it easier for people to understand the concept. You could not make it clearer that an Tetris game with plug-in blocks.

于 2008-09-26T14:31:52.070 回答
0

棱镜可能值得注意。MEF 可用于定义导入/导出任意合约的组件,而 Prism 可用于在分离的 UI 应用程序中定义 UI 区域。

于 2014-02-11T16:32:23.753 回答