Dependence Inversion Principle,DIP High level modules should not depend upon low level modules.Both should depend upon abstractions.高层模块不应该依赖低层模块,二者都应该依赖其抽象 Abstractions should not depend upon details.Details should depend upon abstractions.抽象不应该依赖细节;细节应该依赖抽象 针对接口编程,不要针对实现编程。
Dependence Inversion Principle,DIP
High level modules should not depend upon low level modules.Both should depend upon abstractions.高层模块不应该依赖低层模块,二者都应该依赖其抽象
Abstractions should not depend upon details.Details should depend upon abstractions.抽象不应该依赖细节;细节应该依赖抽象
针对接口编程,不要针对实现编程。