
设计模式
「已注销」
Clean code is focus.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Open Close Principle
Motivation A clever application design and the code writing part should take care of the frequent changes that are done during the development and the maintaining phase of an application. Usually,转载 2013-06-26 18:10:19 · 684 阅读 · 0 评论 -
抽象工厂模式
一、 抽象工厂(Abstract Factory)模式 抽象工厂模式是所有形态的工厂模式中最为抽象和最具一般性的一种形态。 为了方便引进抽象工厂模式,引进一个新概念:产品族(Product Family)。所谓产品族,是指位于不同产品等级结构,功能相关联的产品组成的家族。如图: 图中一共有四个产品族,分布于三个不同的产品等级结构中。只要指明一个产品所处的产品族以及它所属转载 2013-06-26 16:46:00 · 540 阅读 · 0 评论 -
抽象工厂模式二
Motivation Modularization is a big issue in today's programming. Programmers all over the world are trying to avoid the idea of adding code to existing classes in order to make them support encapsu转载 2013-06-26 17:58:49 · 624 阅读 · 0 评论 -
设计模式六大原则
目录: 设计模式六大原则(1):单一职责原则 设计模式六大原则(2):里氏替换原则 设计模式六大原则(3):依赖倒置原则 设计模式六大原则(4):接口隔离原则 设计模式六大原则(5):迪米特法则 设计模式六大原则(6):开闭原则 设计模式六大原则(1):单一职责原则 定义:不要存在多于一个导致类变更的原因。通俗的说,即一个类只负责一项职责。 问题由来:类T负责两个不同的职责转载 2013-06-27 17:58:41 · 801 阅读 · 0 评论