组合模式
摘要:1.定义Compose objects into tree structures to represent part-whole hierarchies.Composite lets clients treat individual objects and compositions of objec...
阅读全文
posted @
2015-07-06 23:36
JustYong
阅读(260)
推荐(0) 编辑
命令模式
摘要:1.命令模式为什么存在假如存在一个项目组用于开发一个客户A需求的项目,项目组一共有三个小组,负责不同的工作,Requirement Group(需求组)用于收集用户需求,Page Group(页面组)负责系统页面,Code Group(逻辑组)负责实现具体的功能实现。需求方把任务交待给项目经理,由项...
阅读全文
posted @
2015-07-06 11:04
JustYong
阅读(254)
推荐(0) 编辑
桥接模式
摘要:1.蜡笔与毛笔的故事(引用自http://www.cnblogs.com/zhenyulu/articles/67016.html)我想大家小时候都有用蜡笔画画的经历吧。红红绿绿的蜡笔一大盒,根据想象描绘出各式图样。而毛笔下的国画更是工笔写意,各展风采。而今天我们的故事从蜡笔与毛笔说起。设想要绘制一...
阅读全文
posted @
2015-07-01 17:54
JustYong
阅读(262)
推荐(0) 编辑
适配器模式
摘要:1.定义Convert the interface of a class into another interface clients expect.Adapter lets classes work together that couldn't otherwise becasue of incom...
阅读全文
posted @
2015-07-01 14:57
JustYong
阅读(398)
推荐(0) 编辑
5.建造者模式
摘要:1.定义Seperate the construction of a complex object from its representation so that the same construction process can create different representations.(...
阅读全文
posted @
2015-07-01 11:17
JustYong
阅读(415)
推荐(0) 编辑
3.抽象工厂模式
摘要:1.定义Provide an interface for creating families of related or dependent objects without specifying their concrete classes.(为创建一组相关或相互依赖的对象提供一个接口,而且无须指定...
阅读全文
posted @
2015-07-01 10:01
JustYong
阅读(229)
推荐(0) 编辑