上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: 一、定义 解释器模式(Interpreter Pattern)是一种按照规定语法进行解析的方案,在现在项目中使 用较少,其定义如下:Given a language, define a representation for its grammar along with an interpreter 阅读全文
posted @ 2016-12-29 23:08 飞轩 阅读(155) 评论(0) 推荐(0)
摘要: 一、定义 定义如下: Allow an object to alter its behavior when its internal state changes.The object will appear to change its class.(当一个对象内在状态改变时允许其改变行为,这个对象看 阅读全文
posted @ 2016-12-29 22:51 飞轩 阅读(164) 评论(0) 推荐(0)
摘要: 一、定义 访问者模式(Visitor Pattern)是一个相对简单的模式,其定义如下:Represent an operation to be performed on the elements of an object structure. Visitor lets you define a n 阅读全文
posted @ 2016-12-29 18:22 飞轩 阅读(161) 评论(0) 推荐(0)
摘要: 一、定义 备忘录模式(Memento Pattern)提供了一种弥补真实世界缺陷的方法,让“后悔药”在程 序的世界中真实可行,其定义如下: Without violating encapsulation,capture and externalize an object's internal sta 阅读全文
posted @ 2016-12-29 07:56 飞轩 阅读(188) 评论(0) 推荐(0)
摘要: 一、定义 门面模式(Facade Pattern)也叫做外观模式,是一种比较常用的封装模式,其定义如 下: Provide a unified interface to a set of interfaces in a subsystem.Facade defines a higher level 阅读全文
posted @ 2016-12-29 07:39 飞轩 阅读(346) 评论(0) 推荐(0)
摘要: 一、定义 观察者模式(Observer Pattern)也叫做发布订阅模式(Publish/subscribe),它是一个在项 目中经常使用的模式,其定义如下: Define a one to many dependency between objects so that when one obje 阅读全文
posted @ 2016-12-28 07:50 飞轩 阅读(195) 评论(0) 推荐(0)
摘要: 一、定义 组合模式(Composite Pattern)也叫合成模式,有时又叫做部分 整体模式(Part Whole), 主要是用来描述部分与整体的关系,其定义如下: Compose objects into tree structures to represent part whole hiera 阅读全文
posted @ 2016-12-28 07:32 飞轩 阅读(179) 评论(0) 推荐(0)
摘要: 一、定义 迭代器模式(Iterator Pattern)目前已经是一个没落的模式,基本上没人会单独写一个迭代器,除非是产品性质的开发,其定义如下: Provide a way to access the elements of an aggregate object sequentially wit 阅读全文
posted @ 2016-12-27 22:53 飞轩 阅读(188) 评论(0) 推荐(0)
摘要: 一、定义 适配器模式(Adapter Pattern)的定义如下: Convert the interface of a class into another interface clients expect.Adapter lets classes work together that could 阅读全文
posted @ 2016-12-27 22:35 飞轩 阅读(184) 评论(0) 推荐(0)
摘要: 一、定义 策略模式(Strategy Pattern)是一种比较简单的模式,也叫做政策模式(Policy Pattern)。其定义如下: Define a family of algorithms,encapsulate each one,and make them interchangeable. 阅读全文
posted @ 2016-12-27 22:00 飞轩 阅读(225) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页