Dependency Injection
Kind: pattern
Layer: Extensibility Core
Aliases: DI
Record: architecture:dependency-injection
Severity: recommended
Scope: class, module, component
Canonical: Ontology
A design pattern that passes an object its dependencies from outside, usually through its constructor.
Listed in Architecture principles, after Inversion of Control (IoC) and before Service Registry.
Requires
Reinforces
Enables
Conflicts with
In tension with
Tensions
Violated by
Refactored by
Severity
Category
Refactors
- Concrete Coupling
- Long Parameter List
- Interface-Based Design
- Referential Transparency
- Low Coupling
- Singleton Pattern
- Inversion of Control
- Service Locator Pattern