Open/Closed Principle hay còn gọi là nguyên tắc Open/Closed là một trong năm design principles cho phát triển phần mềm hướng đối tượng được miêu tả bở Robert C.Martin. Chúng được biết phổ biến nhất với tên SOLID principles:
Single Responsibility Principle
Open/Closed Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion
Mặc dù, nó là nguyên tắc thứ hai trong danh sách các nguyên tắc...
1. Tổng quan
"The Chain of Responsibility pattern establishes a chain within a system, so that a message can either be handled at the level where it is first received, or be directed to an object that can handle it." - Gang of Four
Chain of Responsibility là một design pattern thuộc nhóm Behavioral Pattern. Behavioral Pattern bao gồm những pattern quan tâm đến hành vi của đối tượng, sự giao tiếp giữa các đối tượng với nhau.
Ý tưởng...