We have to do one thing, generally going through three steps, the definition of why,what,how open and close principle is very clear: the software entity should be opened externally, the modification is closed, the implication is that: a software entity should be extended to adapt to change, rather than modify the existing code to achieve change, then, What is a software entity? Software entities typically consist of 1 projects or logic modules of a software PRODUCT 2 abstract and Class 3 method a software product can change as long as it is in the life cycle, since change is an established fact, we should try to adapt to these changes when designing, so as to improve the stability and flexibility of the project. True embrace change the open and closed principle tells us that we should try to achieve change by extending the behavior of the software entity, rather than modifying the existing code to complete the change, which is a principle of constraining the current development design for the future events of the software entity.
The biggest problem of software design is to deal with the change of demand, but the complexity of the demand change is unpredictable, the magic weapon of a rainy day//Six design principles and 23 design Patterns//SRP Single Responsibility principle//LSP Lee's replacement principle//open/Close principle//Dimitri Law//Interface Isolation principle// Reliance leads to principle
Research on design pattern