Software Engineering ยท Architecture
A design principle where the framework calls your code, rather than your code calling the framework โ the framework drives the overall flow, not you.
Mental model: Like a hotel's housekeeping schedule deciding when your room gets serviced, not you.
Example: A test framework that calls your setUp() and tearDown() automatically around every test, rather than you calling the framework.
In practice: Dependency injection is one specific form of IoC โ the broader pattern also covers plugin architectures and template methods, where the framework decides when your code runs.