What is the dependency inversion principle and why is it important?
问题 What is the dependency inversion principle and why is it important? 回答1: Check this document out: The Dependency Inversion Principle. It basically says: High level modules should not depend upon low-level modules. Both should depend upon abstractions. Abstractions should never depend upon details. Details should depend upon abstractions. As to why it is important, in short: changes are risky, and by depending on a concept instead of on an implementation, you reduce the need for change at call