I am developing an enterprise web application and have a little knowledge for inversion of control containers available today. I have an average knowledge for ASP .NET MVC 3. Among the choices I have are Castle.Windsor and Unity. Both has inversion of control container but I don't have the knowledge of which is the best for a ASP .NET MVC 3 web application also that is using an Entity Framework 4.1. Do you know what would I pick as the best or do you know what would be compatible for a web app I am using to develop? Thank you in advance.
Asked
Active
Viewed 423 times
1

abatishchev
- 98,240
- 88
- 296
- 433

Jerameel Resco
- 3,409
- 7
- 23
- 30
-
2They're all much of a muchness. A lot of it is personal preference as they all perform the same function. There are some good benchmarks here: http://www.codinginstinct.com/2008/05/ioc-container-benchmark-rerevisted.html – levelnis Feb 17 '13 at 09:37
-
2Here's a more complete set of figures. After reading this and further research I went with SimpleInjector. It's very good. http://www.palmmedia.de/Blog/2011/8/30/ioc-container-benchmark-performance-comparison – qujck Feb 17 '13 at 11:08
1 Answers
2
There is no such thing as best container. If there was others wouldn't probably existed because everyone would have used this best container. As long as you are using Inversion of Control properly it doesn't really matter which container you choose. Unity, Ninject, Castle Windsor, StructureMap, ... all have a custom DependencyResolver for ASP.NET MVC which could be used to inject dependencies into objects.
If speed and performance is the only thing you care about then you may take a look at Funq
, the container used by ServiceStack
.

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928
-
Thank you very much for the information Darin. I have a clearer decision right now. – Jerameel Resco Feb 17 '13 at 09:52