The opening and closing principle is also one of the five major key principles for object-oriented technology. The Open-Closed PrinciPle principle is: a software entity should be open to the extension and turn it off for modification. Advantages: By expanding existing software systems, new behaviors can be provided to meet new demands for software, so that the software in the change has certain adaptability and flexibility. Software modules, especially the most important abstract layer modules, can no longer be modified, which makes changes in the software system in the change and continuity. How to do extension of existing interfaces instead of modification, the key is abstraction; if you want to make a modification in the published interface, you don't meet the opening and closing principle, it is a little shield: "This thing does not match Existing features, can not be modified, now the writing is not good, what should I do, this shows that your design is unreasonable, you have to reconstruct it, which makes it expandable; it seems to have Mao Dun, "How do I know This place is to be expandable later. If each considering the scalability, then a small software develops is also a very large thing. "This is the opening and closing principle, this is The actual work experience is a key (boundary) problem; do not predict future, doing an existing urgent, so there is no 100% open;