MEF 与 Unity 主要针对组合
我正在创建一个包含许多不同程序集并使用依赖项注入的多层项目。
我正在考虑使用某种工具进行合成,但不确定使用哪一种。
MEF 和 Unity 是强有力的候选者。
我认为如果我将 Web 部件更改为多租户类型,MEF 可能会有所帮助。
那么,如果我都不知道的话,你认为哪一个对作文有利,如果可以的话,请包括论据。
I'm creating a multi layer project with a lot of different assemblies and using dependency injection.
I was thinking about using some tool for composition but not sure which one to use.
MEF and Unity are strong candidates.
I think that MEF could perhaps help if I change the web part to multi tennant type.
So which one in your opinion would be good for composition mainly if I know neither of them and please include argument if able.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于。
在我看来,我更喜欢MEF而不是Unity,因为MEF基于声明组合并且不需要太多配置。如果你没有依赖关系等需要严格控制组件的需求,你可以尝试MEF。
It depends.
In my opinion, I prefer MEF than Unity as MEF based on declare composition and don't need many configuration. If you don't have the requirements which need to control components strictly such as dependency, you can try MEF.