-1

Possible duplicate How to choose a DI container

I believe everyone goes through this dilemma of choosing the right DI container. I read questions regarding this here but they are kind of outdated and probably things has changed since then. Since there are lot of developers here who currently work on MVC project, I thought it could be good idea to listen to their opinion and experience, which could be invaluable for starters like me. In a book ASP.NET MVC4 in Action they have chosen StructureMap because of its "Powerful API and Popularity". But then there is also Unity which is from microsoft, kind of sounds tempting because it is from Microsoft and may be it'll get powerful in future(just guessing).

I'm sure I'll get nice suggestions here. Thanks in advance.

Community
  • 1
  • 1
Cybercop
  • 8,475
  • 21
  • 75
  • 135
  • Plus one of the authors of that book is the guy behind `StructureMap` – levelnis May 24 '13 at 13:54
  • 1
    I was faced with this decision six months ago. I went with Simple Injector and recommend you do the same. It's easy to use and if you get stuck and post a question on SO it gets answered every time. – qujck May 24 '13 at 14:13

1 Answers1

0

I think you should first get an idea of what you're looking for in the DI container and look at feature tables for different DI containers: for example https://stackoverflow.com/a/4583809/3204 The idea is to get a feeling of the features that matter to you and filter out what wouldn't match what's needed.

On a personal note, i'd recommend choosing another DI component; i have a feeling that Microsoft is really trying to cover all bases in the .net ecosystem, and ends up being a jack of all trade and ace of none; open source projects apparently end up being much more resilient to changes of focus in Microsoft attention.

Community
  • 1
  • 1
samy
  • 14,832
  • 2
  • 54
  • 82
  • That part "being a jack of all trade and ace of none", I agree on that. Anyways thanks for suggestion. – Cybercop May 24 '13 at 13:42
  • To expand on this question, i have been using recently Castle.Windsor and I really love it, so i'd go with that. What did you end up choosing? – samy Mar 12 '14 at 11:38