Last post Jul 05, 2012 10:15 AM by atconway
Jul 03, 2012 03:50 PM|dotnetterAMG123|LINK
Jul 05, 2012 10:15 AM|atconway|LINK
I too prefer DI vs. the Service Locator pattern. One of my main gripes is since the intermediary ServiceLocator interface is often passed into the constructor and not the actual dependent interface, it is difficult to tell without some documentation
which dependencies are to be resolved. DI is more explicit in telling which dependencies are required. Also the maintenance burden of expanding the definition of the service locator can be a pain. I am not so sure I would call it an anti-pattern, but het anyone
can write a blog post, even me! It's shortcomings are often noted though vs. DI.
Some of the popular DI frameworks for .NET are listed below. Even though that link is a few years old, upon reviewing the different frameworks are still applicable As for IDE editions affecting the choice in DI implementation. IMO, one has nothing
to do with the other, other than any design time support if that is what you were referring to. However, this is a design pattern that is independent of the VS.NET IDE.
List of .NET Dependency Injection Containers (IOC):