08 2017 档案

摘要:1、定义 1.1 标准定义 桥梁模式( Bridge Pattern) 也叫做桥接模式, 是一个比较简单的模式, 其定义如下: Decouple an abstraction from its implementation so that the two can vary independently 阅读全文
posted @ 2017-08-09 00:05 Memset 阅读(1611) 评论(1) 推荐(0)
摘要:1、定义 1.1 标准定义 享元模式( Flyweight Pattern) 是池技术的重要实现方式, 其定义如下: Use sharing to support large numbers of fine-grained objects efficiently.(使用共享对象可有效地支持大量的细粒 阅读全文
posted @ 2017-08-08 22:51 Memset 阅读(285) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 解释器模式( Interpreter Pattern) 是一种按照规定语法进行解析的方案, 在现在项目中使用较少,其定义如下:Given a language, define a representation for its grammar along with an i 阅读全文
posted @ 2017-08-08 22:17 Memset 阅读(283) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 其定义如下: Allow an object to alter its behavior when its internal state changes.The object will appear to change its class.(当一个对象内在状态改变时允许其 阅读全文
posted @ 2017-08-08 21:51 Memset 阅读(257) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 访问者模式(Visitor Pattern)是一个相对简单的模式,其定义如下:Represent an operation to be performed on the elements of an object structure. Visitor lets you d 阅读全文
posted @ 2017-08-07 23:41 Memset 阅读(276) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 备忘录模式(Memento Pattern)提供了一种弥补真实世界缺陷的方法,让“后悔药”在程序的世界中真实可行,其定义如下:Without violating encapsulation,capture and externalize an object's inter 阅读全文
posted @ 2017-08-07 21:18 Memset 阅读(238) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 门面模式(Facade Pattern)也叫做外观模式,是一种比较常用的封装模式,其定义如下: Provide a unified interface to a set of interfaces in a subsystem.Facade defines a highe 阅读全文
posted @ 2017-08-06 23:43 Memset 阅读(343) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 观察者模式(Observer Pattern)也叫做发布订阅模式(Publish/subscribe),它是一个在项目中经常使用的模式,其定义如下: Define a one-to-many dependency between objects so that when 阅读全文
posted @ 2017-08-06 21:20 Memset 阅读(387) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 组合模式(Composite Pattern)也叫合成模式,有时又叫做部分-整体模式( Part-Whole),主要是用来描述部分与整体的关系,其定义如下: Compose objects into tree structures to represent part-wh 阅读全文
posted @ 2017-08-02 23:10 Memset 阅读(286) 评论(0) 推荐(0)
摘要:1、定义 1.1 标准定义 迭代器模式(Iterator Pattern)目前已经是一个没落的模式,基本上没人会单独写一个迭代器,除非是产品性质的开发,其定义如下: Provide a way to access the elements of an aggregate object sequent 阅读全文
posted @ 2017-08-01 22:40 Memset 阅读(307) 评论(0) 推荐(0)