Reputation: 68912
I Built an IoC container long time ago while watching this show http://www.dnrtv.com/default.aspx?showNum=126 few months ago, and did a small sample using it, and was working fine.
Now I am using unity as a dependency injection container in a project I am starting, and also tried NInject in a previous small MVC website.
But I am now asking my self, what these containers benefits over the one I created from the show, I just can see that it load from the config file, which I can do in mine, is there something else I am missing? I just want some one to tell me you must use these containers because of 1, 2 , 3 reasons which is better than yours.
Upvotes: 3
Views: 285
Reputation: 29401
Other IoC containers would:
With your own, you'd be a LONG way behind, and wouldn't have the support of all the things mentioned above.
If you're aiming to build something that competes with the players already out there (such as Autofac, Ninject, Unity, etc) then make that your product.
Upvotes: 4
Reputation: 499002
First off, these containers are widely used, hence well tested in real world situations - I don't know about yours.
They are also well documented and familiar to many developers, so if working in a team, there is no need to teach others about yours.
Some containers offer fluent configuration (that is, configuration in code), this gives you type safety during compile time vs run time.
However, if your container works for you and there are no other developers involved, why change?
Upvotes: 7