Skip to content
Latchkey

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

Run this faster and cheaper on Latchkey managed runners. Start free →