摘要:
一、原理介绍 1、官方定义 接口隔离原则,英文缩写 ISP ,全称Interface Segregation Principle。 原始定义:Clients should not be forced to depend upon interfaces that they don't use,还有一种 阅读全文
摘要:
一、原理介绍 1、官方定义 依赖倒置原则,英文缩写 DIP ,全称Dependence Inversion Principle。 原始定义:High level modules should not depend upon low level modules. Both should depend 阅读全文
摘要:
开放封闭原则 在面向对象的设计中有很多流行的思想,比如说 "所有的成员变量都应该设置为私有(Private)","要避免使用全局变量(Global Variables)","使用运行时类型识别(RTTI:Run Time Type Identification,例如 dynamic_cast)是危险 阅读全文