Inversion of Control (IoC)
Inversion-of-Control is a high-level Design-Principle used in Software-Engineering to increase the Modularity and extensibility of applications. In traditional procedural programming, the custom code is responsible for the flow of execution and the lifecycle of its dependencies. However, in an IoC architecture, this flow is inverted: a Framework or Runtime-Environment takes control of the execution flow and calls into the custom code when necessary.
The concept was significantly popularized by Martin-Fowler, who noted that Inversion-of-Control is often implemented through Dependency-Injection, though it can also be achieved through the Strategy-Pattern, Service-Locator-Pattern, or the Template-Method-Pattern. By decoupling the execution of a task from its implementation, Inversion-of-Control allows developers to write more flexible code that is easier to unit test using Mock-Objects.
Prominent examples of systems utilizing this principle include the Spring-Framework for Java, Angular for web development, and various Unit-Testing frameworks like JUnit. These systems manage the lifecycle of objects and automatically provide the necessary dependencies at runtime.
For more detailed technical specifications, refer to the Martin Fowler Article on DI and IoC or the Wikipedia page for Inversion of Control.