On the web, these concepts seem complex and controversial. I read a few of these articles and summarize them according to my own comprehension. Where study, must have the note output, otherwise equal to never learned.
In fact, the inversion of dependency in control inversion (IoC), Dependency Injection (DI), and design patterns is same strain: a representation of interface-oriented programming.
The principle of dependency inversion:
A. High-level modules should not be dependent on low levels of modules, they should all rely on abstraction.
B. Abstractions should not be dependent on specifics, but should be dependent on abstraction.
Second, control reversal:
A direct dependency between two objects becomes a common dependency on the interface.
This is the reverse; control, originally two objects are coupled very deep, control each other.
Iii. Dependency Injection:
Inside an object A, another object B is used. This depends very deeply. Switch
Inside object A, an interface or abstract function is used, and object B inherits from that interface or abstract function. During the run, the object B is then passed as a parameter to the inside of object A (injected, I am, good yellow good violence).
In these several concepts are closely related to the interface.