The question of “What is Inversion of Control?” or “What is Dependency Injection?” is met with code examples, vague explanations and even on StackOverflow identified as low quality answers — https://stackoverflow.com/questions/3058/what-is-inversion-of-control
We use inversion of control and dependency injection and even push it as the correct way to build applications. Yet, we can not clearly articulate why!!!
The reason is we have not clearly identified what “control” is. Once we understand what we are inverting, the concept of Inversion of Control vs Dependency Injection is not actually the question to be asked. It actually becomes the following:
Inversion of Control = Dependency (state) Injection + Thread Injection + Continuation (function)…