主要的 C# DI/IoC 框架如何比较? [英] How do the major C# DI/IoC frameworks compare?

查看:36
本文介绍了主要的 C# DI/IoC 框架如何比较?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

冒着踏入圣战领域的风险,这些流行的 DI/IoC 框架的优缺点是什么,容易被认为是最好的吗?..:

At the risk of stepping into holy war territory, What are the strengths and weaknesses of these popular DI/IoC frameworks, and could one easily be considered the best? ..:

  • Ninject
  • 团结
  • Castle.Windsor
  • Autofac
  • 结构图

是否还有其他我没有在此处列出的 C# DI/IoC 框架?

Are there any other DI/IoC Frameworks for C# that I haven't listed here?

在我的用例上下文中,我正在构建一个客户端 WPF 应用程序和一个 WCF/SQL 服务基础结构、易用性(尤其是在清晰简洁的语法方面)、一致的文档、良好的社区支持和性能我选择的所有重要因素.

In context of my use case, I'm building a client WPF app, and a WCF/SQL services infrastructure, ease of use (especially in terms of clear and concise syntax), consistent documentation, good community support and performance are all important factors in my choice.

所引用的资源和重复问题似乎已过时,了解所有这些框架的人能否站出来提供一些真正的见解?

The resources and duplicate questions cited appear to be out of date, can someone with knowledge of all these frameworks come forward and provide some real insight?

我意识到关于这个主题的大多数意见可能都有偏见,但我希望有人花时间研究所有这些框架并至少进行总体客观的比较.

I realise that most opinion on this subject is likely to be biased, but I am hoping that someone has taken the time to study all these frameworks and have at least a generally objective comparison.

如果以前没有这样做过,我很愿意自己进行调查,但我认为至少有一些人已经这样做了.

I am quite willing to make my own investigations if this hasn't been done before, but I assumed this was something at least a few people had done already.

如果您确实有使用多个 DI/IoC 容器的经验,请对它们的优缺点进行排序和总结,谢谢.这不是发现人们制作的所有晦涩的小容器的练习,我正在寻找流行(和活跃)框架之间的比较.

If you do have experience with more than one DI/IoC container, please rank and summarise the pros and cons of those, thank you. This isn't an exercise in discovering all the obscure little containers that people have made, I'm looking for comparisons between the popular (and active) frameworks.

推荐答案

虽然对这个问题的全面回答占用了数百页 我的书,这是我仍在制作的快速比较图表:

While a comprehensive answer to this question takes up hundreds of pages of my book, here's a quick comparison chart that I'm still working on:

这篇关于主要的 C# DI/IoC 框架如何比较?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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