Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparison (pros/cons) of various .NET dependency injection frameworks

I am in the process of selecting a dependency injection framework for a new .NET application. There is a bewildering plethora of these frameworks out there, including Ninject, StructureMap, Unity, Castle Windsor, Spring.NET, etc., etc. I never believe that any one tool is absolutely better or worse than any other, however; it always depends on context and constraints.

With that in mind, can anyone offer some pros and cons of the various .NET dependency injection frameworks, vis-a-vis each other? Which are more suitable for small projects, large projects, etc.? For what types of projects, architectures, and development teams do each work best or not so well? Any wisdom from those who have worked with several of these frameworks would be very helpful...

like image 589
KP Taylor Avatar asked Apr 14 '11 03:04

KP Taylor


People also ask

Does .NET framework have dependency injection?

. NET supports the dependency injection (DI) software design pattern, which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies. Dependency injection in . NET is a built-in part of the framework, along with configuration, logging, and the options pattern.

Which framework is used for dependency injection?

Spring.NET is one of the popular open source frameworks for Dependency Injection. Spring.NET supports . NET 4.0, . NET Client Profile 3.5 and 4.0, Silverlight 4.0 and 5.0, and Windows Phone 7.0 and 7.1.


1 Answers

Here is a nice performance benchmark:

  • IoC Container Benchmark - Performance comparison
like image 194
Steven Avatar answered Sep 19 '22 14:09

Steven