DEV Community

Discussion on: What inverts in the dependency inversion principle?

Collapse
 
thefuquan profile image
Redouane M. BOUDELLA

That was a good read.

I think we can say that before the inversion, high level module depends on low level modules coz the copier should know about the keyboard and printer modules in order for it to call their functions, and the low level modules may know nothing about the high level ones.

After the inversion, the high level modules introduces a protocol, a contract aka an interface that the low level modules should know about in order to implement them, that is the inversion as the high level modukes now may/should know nothing about the low level ones