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). It is a special form of the more general dependency inversion.
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).
Use the tag for:
- The principles of dependency injection
- When/How/Should one use dependency injection in a given, detailed situation
- The way the injection is performed (at construction, at the call of a method, or via properties)
- Usage of dependency injection along with other design patterns, or/and in unusual situations
More information:
- What is Dependency Injection?
- Design Patterns: Dependency Injection and usage of Spring.NET on MSDN
- Inversion of Control Containers and the Dependency Injection pattern by Martin Fowler
Disambiguation:
- avoid the confusion with the more general dependency-inversion, of which dependency injection is a special case;
- avoid the confusion with the different concern of inversion-of-control, which can be implemented with the help of dependency-injection