摘要:
组合模式的定义: 主要用来描述部分和整体的关系,其定义如下: Compose objects into tree structure to represent part-whole hierarchies. Composite lets clients treatindividual objects 阅读全文
posted @ 2016-05-14 19:11
山高我为峰
阅读(219)
评论(0)
推荐(0)
摘要:
访问者模式是一个相对简单的模式,其定义如下: Represent an operation to be performed on the elements of an object structrue. Visitor lets you define a new operation without 阅读全文
posted @ 2016-05-14 17:37
山高我为峰
阅读(246)
评论(0)
推荐(0)
摘要:
备忘录模式提供了一种弥补真实世界缺陷的方法,让“后悔药”在程序世界中可行,其定义如下: Without violating encapsulation, capture and externalize an object's internal state so that the object can 阅读全文
posted @ 2016-05-14 16:14
山高我为峰
阅读(269)
评论(0)
推荐(0)
摘要:
门面模式也叫做外观模式,是一种比较常用的封装模式,其定义如下: Provide a unifield interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes 阅读全文
posted @ 2016-05-14 14:22
山高我为峰
阅读(344)
评论(0)
推荐(0)
摘要:
观察者模式又叫发布订阅模式,其定义如下: Define a one-to-money dependency between objects so that when one object changes state,all its dependents arenotified and updated 阅读全文
posted @ 2016-05-14 13:54
山高我为峰
阅读(308)
评论(0)
推荐(0)
浙公网安备 33010602011771号