开发者

How should you define the word "Details" mentioned in Dependency inversion principle of SOLID?

开发者 https://www.devze.com 2023-01-31 01:25 出处:网络
From Wikipedia: The principle states: A. High-level modules should not depend on low-level modules. Both should depend on abstractions.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号