计算机英语词汇(更新中) - 我想说。。。 - 博... ... Liskov Substitution Principle (LSP) - OO设计的里氏替换原则 Single Responsibility Principle (SRP) - OO设计的单一职责原则 The Open-Closed Principle (OCP) - OO设计的开闭原则 ...
基于6个网页-相关网页
我建议你将开闭原则作为一个设计方向而非一个完全的目标。
I would recommend that you treat the Open Closed Principle as a design vector rather than an outright goal.
如果你可以通过实现IDataSource对这个系统进行扩展并且不对BusinessProcess类做任何的修改,那么这个设计就遵循了开闭原则。
The design follows the Open Closed Principle if you can extend the system by swapping out implementations of IDataSource without making any change to the BusinessProcess class.
应用推荐