Dependency Inversion Principle.
8/8/25Less than 1 minute
Dependency Inversion Principle
Description
The Dependency Inversion Principle (DIP) states that high level modules should not depend on low level modules; both should depend on abstractions. Abstractions should not depend on details. Details should depend upon abstractions.
- Là 1 nguyên lí thiết kế.
- Module cấp cao không nên phụ thuộc vào các module cấp thấp. Cả 2 nên phụ thuộc vào abstractions.
- Abstractions (interface) không nên phụ thuộc vào chi tiết và ngược lại ( Các class giao tiếp với nhau thông qua interface, không phải thông qua implementation.)
Remember: New is Glue