IoC Containers - Which is best? (.Net) [closed]
-
02-07-2019 - |
Question
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)?
Solution
"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.
OTHER TIPS
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.
I like StructureMap. The latest version allows you to declare inline too without having to resort to XML configuration files.