IOC and DI are very useful patterns that are used in almost every production project. But, for me personally, they are pretty misleading and difficult concepts to understand. Here, I'll example what both of them are and implement a simplified proof of concept.

So initialization is not done in constructor but by classes themselves (control is inverted).

Related Articles