Note: this article is published on 07/01/2024.
This series of articles will discuss Software Design Principles.
Inversion of Control is a principle in software engineering which transfers the control of objects or portions of a program to a container or framework. We most often use it in the context of object-oriented programming.
In contrast with traditional programming, in which our custom code makes calls to a library, IoC enables a framework to take control of the flow of a program and make calls to our custom code. To enable this, frameworks use abstractions with additional behavior built in.
The content of this article:
As discussed above IoC is a generic term for a program workflow to be inverted. The implementation is usually the Dependency Injection, but not limited to DI. In general, there are more than several ways to implement the IoC, such as
Specifically for Dependency Injection Implementation
References: