Inversion of Control - CI/CD Glossary Definition
Inversion of control hands control of object creation and flow to a framework or container instead of your own code.
Inversion of control is a principle where the framework or container, rather than your code, controls the flow and the creation of objects. Dependency injection is a common form of it.
The phrase "don't call us, we'll call you" captures the idea: your code provides pieces and the framework decides when to invoke them. This decoupling improves testability.
Relation to DI
Dependency injection is one way to achieve inversion of control, specifically for supplying dependencies. Service locators are another, less favored form.
Related guides
Dependency Injection - CI/CD Glossary DefinitionDependency Injection: Dependency injection is a design technique where a component receives its dependencies…
Test Isolation - CI/CD Glossary DefinitionTest Isolation: Test isolation means each test runs independently, without depending on or affecting other te…
Test Double - CI/CD Glossary DefinitionTest Double: A test double is any object that stands in for a real dependency during a test. Mocks, stubs, sp…