I was wondering which one is simpler between Ninject and StructureMap ? Is there anything i should be aware when using them开发者_如何学JAVA ?
Thanks.
IMHO, Ninject is probably easier to get started with if you've never done any DI before, but I've found StructureMap to be more extensible.
Whichever container you opt-for, try and follow the usual advice, and wrap it behind interfaces (not the little 'i') that you own. Embedding any 3rd party component deep into your code is usually asking for trouble.
At the end of the day, it's down to personal taste.
精彩评论