Open Closed Principle
- software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification by Bertrand Meyer in 1988
- The Open-Closed Principle by Uncle Bob
- It advocates the concept of interface.
- What is closed?
- The code in the client is closed to be modified.
- What is open?
- The code in the server is open to be added.
- Use an abstract server to be called by the client. Then, implement the behavior in the concrete server.
- A new concrete server can be added when it is necessary.
page revision: 3, last edited: 21 Mar 2016 03:03