views:

776

answers:

3

I'd like to get a feel for what people are using for IoC containers. I've read some good things about Castle Windsor, but I know a lot of people use StructureMap, Unity, Ninject, etc.

What are some of the differences amongst those mentioned (and any I neglected). Strengths? Weaknesses? Better fit (like StructureMap is great for ABC but not so good for XYZ)?

+4  A: 

"Best" will always be subjective.

That said, I favor Castle Windsor because its XML is simpler. I've only tried Windsor and Spring.NET, by the way, so I couldn't say much about the others.

cruizer
About Windsor's config, you can configure it programmatically with the new fluent registration API (http://using.castleproject.org/display/IoC/Fluent+Registration+API)
Mauricio Scheffer
+4  A: 

I like StructureMap. The latest version allows you to declare inline too without having to resort to XML configuration files.

Kevin Pang
+3  A: 

I like much Ninject... is simple, easy to use, it has such kind of fluid notation to declare bindings between classes and interfaces and supports contextual binding. Awesome.