Which single IoC/DI container would you recommend using and why?

Posted by Rob G on Stack Overflow See other posts from Stack Overflow or by Rob G
Published on 2008-09-16T10:30:07Z Indexed on 2010/03/25 12:43 UTC
Read the original article Hit count: 313

I'm asking this question because it's a good way to gauge how the community at large feels about the various containers/frameworks and why. Also, whilst my expertise may lie in .Net development, I am very interested in which frameworks are popular (and why) in other languages. If I feel the need to start digging into Java for instance, then I'd like to hit the ground running with good (comfortable) knowledge that I'm starting in the right direction. Does Ruby even need one with all its magnificent dynamicism? I have my own opinions on the .Net front, and will probably add my own personal favourite in an answer below, but I'm interested in all languages and opinions here.

With all that in mind, could you please state only one IoC/DI framework that you use and recommend with the language of choice (Java/Ruby/.Net/Smalltalk etc.) and your reasoning for your choice, and if someone has already answered your particular flavour, then you can just vote it up and add comments to it so that anyone looking for advice in future and see which frameworks are more than likely to work for them once they read your reasoning. I'm hoping that over time, the best ones will bubble up to the top.

I realise that this question doesn't have only one correct answer, so I won't be choosing one - the community will decide which framework gets the most votes and why. Of course, if you really feel strongly opposed to a particular brand, you could take the reputation hit and vote it down too, and this question can serve as a true wiki-style entry for research into this field.

Remember, only one IoC per answer you write please - if you feel the need to promote two frameworks, then write two answers with your reasoning inside for each choice - then others in the community can agree or disagree with you.

© Stack Overflow or respective owner

Related posts about frameworks

Related posts about dependency-injection