MEF与Mono.AddIn [英] MEF vs Mono.AddIn

查看:96
本文介绍了MEF与Mono.AddIn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发.NET 3.5 C#桌面应用程序.它应该可以通过插件扩展.

I'm developing a .NET 3.5 C# desktop application. It should be extensible via plug-ins.

是否有其他文章讨论MEF和Mono.AddIn之间的区别以帮助我做出明智的决定?

Are there any articles etc. discussing the differences between MEF and Mono.AddIn to help me make an informed decision?

或者更好的是,您对这两个框架都有经验,可以对它们进行评论吗?

Or even better have you got experience with both of these frameworks and can comment on them?

谢谢, 帕特里克

推荐答案

[注意:我正在使用Mono.Addins的MonoDevelop上工作,但是我与MEF团队的Glenn Block广泛讨论了MEF和Mono.Addins之间的区别.上周]

[NOTE: I work on MonoDevelop, which uses Mono.Addins, but I discussed the differences between MEF and Mono.Addins extensively with Glenn Block from the MEF team last week]

MEF基于组成代码,尽管底层抽象非常灵活.相比之下,Mono.Addins基于元数据树,您可以在其中将数据/元数据/代码插入到定义的丰富模式中,以便扩展可以添加数据/元数据以及代码.

MEF is based on composing code, though the underlying abstractions are very flexible. In contrast, Mono.Addins is based on a tree of metadata, where you can plug data/metadata/code into a rich schema of your definition, so extensions can add data/metadata as well as code.

Mono.Addins为您提供了开箱即用的外接程序管理/打包/存储库/更新系统.对于MEF,此时,您必须构建自己的.

Mono.Addins gives you an addin management/packaging/repository/update system out-of-the box. For MEF, at this point, you would have to build your own.

MEF的进入门槛稍低,其可用性和底层抽象也投入了更多的设计工作.此外,它是.NET 4的一部分,因此它将有更大的用户社区为此开发/为其开发.

MEF has a slightly lower barrier to entry, and a lot more design work has gone into its usability and underlying abstractions. In addition, it's part of .NET 4, so it'll have a much bigger community of users developing with/for it.

这时,如果您需要插入数据/元数据以及代码,并且希望使用现成的打包系统,则建议使用Mono.Addins,否则建议使用MEF.展望未来,Mono.Addins的功能很可能会在MEF上实现,因此可能会有向MEF的移植之路.

At this point, if you need to plug in data/metadata as well as code and you want a ready-made packaging system, I'd recommend Mono.Addins, otherwise I'd recommend MEF. Going forwards, it's likely that Mono.Addins' features will be implemented on MEF, so there will probably be a migration path towards MEF.

这篇关于MEF与Mono.AddIn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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