Why do I need an IoC container as opposed to straightforward DI code?

Posted by Vadim on Stack Overflow See other posts from Stack Overflow or by Vadim
Published on 2009-05-16T01:06:18Z Indexed on 2010/05/19 0:30 UTC
Read the original article Hit count: 527

I've been using Dependency Injection (DI) for awhile, injecting either in a constructor, property, or method. I've never felt a need to use an Inversion of Control (IoC) container. However, the more I read, the more pressure I feel from the community to use an IoC container.

I played with .NET containers like StructureMap, NInject, Unity, and Funq. I still fail to see how an IoC container is going to benefit / improve my code.

I'm also afraid to start using a container at work because many of my co-workers will see code which they don't understand. Many of them may be reluctant to learn new technology.

Please, convince me that I need to use an IoC container. I'm going to use these arguments when I talk to my fellow developers at work.

© Stack Overflow or respective owner

Related posts about inversion-of-control

Related posts about dependency-injection