摘要: @[Toc] 什么是开闭原则? 开闭原则的定义: Software entities like classes,modules and functions should be open for extension but closed for modifications.(一个软件实体如类、模块和函 阅读全文
posted @ 2020-02-23 20:49 三分恶 阅读(406) 评论(0) 推荐(0) 编辑
摘要: @[Toc] 什么是迪米特原则? 迪米特法则来自于1987年美国东北大学(Northeastern University)一个名为“Demeter”的研究项目。迪米特法则又称为最少知识原则(LeastKnowledge Principle, LKP),其定义如下: 迪米特法则(Law of Deme 阅读全文
posted @ 2020-02-23 18:44 三分恶 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 什么是接口隔离原则? 接口隔离原则有两种定义: Clients should not be forced to depend upon interfaces that they don't use.(客户端不应该强行依赖它不需要的接口) The dependency of one class to 阅读全文
posted @ 2020-02-23 14:25 三分恶 阅读(372) 评论(0) 推荐(0) 编辑