On the Internet, these concepts seem complicated and controversial. I read a few of them and summarized them as I understood them. Any study, must have notes output, otherwise equal to never learned.

Inversion of control (IoC), dependency injection (DI), and dependency inversion in design patterns are all in the same vein: they are all expressions of interface oriented programming.

I. Dependence Inversion Principle:

A. High-level modules should not depend on low-level modules, they should all depend on abstractions. B. Abstraction should not depend on concrete, but concrete should depend on abstraction. \

Ii. Inversion of control:

A direct dependency between two objects becomes a co-dependency interface.

That’s the inverse; Control, originally two objects are deeply coupled and mutually controlled. \

3. Dependency injection:

Inside one object A, another object B is used. This is very dependent. To:

Inside object A, an interface or abstract function is used, and object B inherits from that interface or abstract function. In the process of running, object B is passed as A parameter into object A (injection, damn, good yellow good violence).

\

These concepts are closely related to interfaces.

\