What are the downsides to using dependency injection?
Posted
by kerry
on Gooder Code
See other posts from Gooder Code
or by kerry
Published on Mon, 14 Feb 2011 18:10:26 +0000
Indexed on
2011/02/14
23:32 UTC
Read the original article
Hit count: 408
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.
© Gooder Code or respective owner