I’m trying to introduce dependency injection (DI) as a pattern here at work and one of our lead developers would like to know: What, if any, are the downsides to using the dependency injection pattern?
Note I’m looking here for an, if possible, exhaustive list, not a subjective discussion on the topic.
Clarification: I’m talking about the dependency injection pattern (see this article by Martin Fowler), not a specific framework, whether XML-based (such as Spring) or code-based (such as Guice), or "self-rolled".
Some great further discussion / ranting / debate is going on the Reddit’s subreddit /r/programming.
A couple of points:
Generally, the benefit of decoupling makes each task simpler to read and understand, but increases the complexity of orchestrating the more complex tasks.