摘要: The Single-Responsibility Principle (SRP)A class should have only one reason to change.单一职责原则(SRP)一个类应该仅有一个引起它变化的原因。The Open/Closed Principle (OCP)Software entities (classes, modules, functions, etc.) should be open for extension but closed for modification.开放封闭原则(OCP)软件实体(类,模块,函数等等)应该是对扩展开放的,对修改封闭的 阅读全文