I think there is no differences between them! Its associated on your-self. Every body has some favorites, and you too. I use StructureMap and its good enough for large and/or small scale applications.
UPDATE:
Well, a few months ago I met with Simple Injector which is really really simple, and actually fast. I've used it in several projects with different scales, and it really works perfectly.
我只真正研究过/使用过 Ninject,根本没有费心去研究任何其他的。使用简单它的学习曲线较低,非常适合我最近的几个项目。在我看来,它是一个很棒的 IoC 容器,适用于大大小小的项目。
I've only really looked at / used Ninject and simply haven't bothered looking at any others. The simplicity in usage & it's low learning curve fit my last couple of projects very well. IMO, it is a great IoC container for projects large and small.
使用 ASP.NET MVC 时,我还喜欢 StructureMap NuGet 包如何很好地为您连接起来。
I've used Unity (some time ago), AutoFac and StructureMap and prefer StructureMap, specifically for its AssertConfigurationIsValid method which I use in unit tests to, well, assert that my StructureMap configuration is valid (relevant if you're using constructor-based DI).
As far as I'm aware only StructureMap offers this facility.
When using ASP.NET MVC, I also like how the StructureMap NuGet package wires things up for you nicely.
发布评论
评论(5)
本文对最流行的 IoC 框架进行了很好的总结,并讨论了它们的性能和易用性。总而言之,这是一本很棒的书!
http://philipm.at/2011/di_speed.html
&后续内容 http://philipm.at/2011/di_speed_redux.html
This article has a good summary of most popular IoC frameworks and discusses their performance as well as ease of use. All in all a great read!
http://philipm.at/2011/di_speed.html
& a follow-up at http://philipm.at/2011/di_speed_redux.html
我认为他们之间没有什么区别!它与你自己有关。每个人都有一些最爱,你也一样。我使用StructureMap,它对于大型和/或小型应用程序来说已经足够好了。
更新:
嗯,几个月前我遇到了Simple Injector,它真的非常简单,而且速度非常快。我已经在几个不同规模的项目中使用过它,而且效果确实很完美。
I think there is no differences between them! Its associated on your-self. Every body has some favorites, and you too. I use
StructureMap
and its good enough for large and/or small scale applications.UPDATE:
Well, a few months ago I met with Simple Injector which is really really simple, and actually fast. I've used it in several projects with different scales, and it really works perfectly.
如果您对它们如何在大型 Web 应用程序中使用感兴趣,OrchardCMS 是一个不错的选择;它使用 Autofac。
If you are interested in HOW they are used in large scale web apps, one good one to look at is OrchardCMS; it uses Autofac.
我只真正研究过/使用过 Ninject,根本没有费心去研究任何其他的。使用简单它的学习曲线较低,非常适合我最近的几个项目。在我看来,它是一个很棒的 IoC 容器,适用于大大小小的项目。
I've only really looked at / used Ninject and simply haven't bothered looking at any others. The simplicity in usage & it's low learning curve fit my last couple of projects very well. IMO, it is a great IoC container for projects large and small.
我使用过 Unity(前段时间)、AutoFac 和 StructureMap,并且更喜欢 StructureMap,特别是因为它的
AssertConfigurationIsValid
方法,我在单元测试中使用该方法来断言我的 StructureMap 配置有效(相关的情况)您正在使用基于构造函数的 DI)。据我所知,只有 StructureMap 提供此功能。
使用 ASP.NET MVC 时,我还喜欢 StructureMap NuGet 包如何很好地为您连接起来。
I've used Unity (some time ago), AutoFac and StructureMap and prefer StructureMap, specifically for its
AssertConfigurationIsValid
method which I use in unit tests to, well, assert that my StructureMap configuration is valid (relevant if you're using constructor-based DI).As far as I'm aware only StructureMap offers this facility.
When using ASP.NET MVC, I also like how the StructureMap NuGet package wires things up for you nicely.