Dependency injection
noun phraseDefinition
A design pattern where objects receive their dependencies from an external source rather than creating them internally. Improves testability and decoupling.
In a sentence
"By using dependency injection, we can swap the real database for a test double in unit tests without changing the service code."