How should you define the word "Details" mentioned in Dependency inversion principle of SOLID?
From Wikipedia:
The principle states:
A. High-level modules should not depend on low-level modules. Both should depend on abstractions.
B. Abstractions should not depend upon details. Details should depend upon abstractions.
I can understand A.
But I have a problem to write a definition for "Details" in (B).
How can I 开发者_Python百科define the term DEFINITION? What does it exactly stand for?
Thanks!
I would say to think of "Abstractions" as Interfaces and "Details" as Implementations of those interfaces... obviously the DI paradigm encompasses more that that simple scenario, but its a good place to start
精彩评论