DI, dependency-injection, is a design pattern where dependencies (instances of objects, properties) of a component are set through the constructor(s), methods or fields (properties)

Questions related to the following topics are welcome:

  • When/How/Should one use dependency injection in a given, detailed situation
  • The principles of dependency injection
  • Usage of dependency injection along with other design patterns, or/and in unusual situations

For more information, check out the following links:

Also, please note that questions on the distinction between the dependency-injection and inversion-of-control have already been answered.

history | excerpt history