What are the downsides to using dependency injection?
- by kerry
I recently came across an interesting question on stack overflow with some interesting reponses. I like this post for three reasons. First, I am a big fan of dependency injection, it forces you to decouple your code, create cohesive interfaces, and should result in testable classes. Second, the author took the approach I usually do when trying to evaluate a technique or technology; suspend personal feelings and try to find some compelling arguments against it. Third, it proved that it is very difficult to come up with a compelling argument against dependency injection.
What are the downsides to using dependency injection?