mirror of
https://github.com/NohamR/knowledge-kit.git
synced 2026-05-25 04:17:17 +00:00
feature: design patter
This commit is contained in:
7
Chapter6 - Design Pattern/6.7.md
Normal file
7
Chapter6 - Design Pattern/6.7.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# SOLID之依赖反转原则
|
||||
依赖反转原则的英文翻译是 Dependency Inversion Principle,缩写为 DIP。中文翻译有时候也叫依赖倒置原则。
|
||||
|
||||
> High-level modules shouldn’t depend on low-level modules. Both modules should depend on abstractions. In addition, abstractions shouldn’t depend on details. Details depend on abstractions.
|
||||
|
||||
高层模块不应该依赖低层模块,高层模块和低层模块都应通过抽象来互相依赖。抽象不要依赖具体的实现细节,具体的实现细节应该依赖抽象。
|
||||
|
||||
Reference in New Issue
Block a user