摘要:
桥梁模式也叫桥接模式,其定义如下: Decouple an abstraction from its implementation so that the two can vary independently. 将抽象和实现解耦,使得两者可以独立地变化 桥梁模式的角色: Abstraction抽象化 阅读全文
摘要:
享元模式是池技术的重要实现方式,其定义如下: Use sharing to support large numbers of fine-grained objects efficiency.使用共享对象可有效的支持大量的细粒度的对象享元模式的定义为我们提出了两个要求:细粒度的对象和共享对象细粒度对象 阅读全文
摘要:
解释器模式的定义是一种按照规定语法进行解析的方案,在现在项目中使用的比较少,其定义如下: Given a language, define a representation for its grammar along with an interpreter that uses the represe 阅读全文
摘要:
状态模式的定义如下: Allow an object to alter its behavior when its internal state changes. The objects will appear to changeits class. 当一个对象内在状态改变时允许其改变行为这个对象看 阅读全文
摘要:
访问者模式是一个相对简单的模式,其定义如下: Represent an operation to be performed on the elements of an object structrue. Visitor lets you define a new operation without 阅读全文
摘要:
备忘录模式提供了一种弥补真实世界缺陷的方法,让“后悔药”在程序世界中可行,其定义如下: Without violating encapsulation, capture and externalize an object's internal state so that the object can 阅读全文
摘要:
门面模式也叫做外观模式,是一种比较常用的封装模式,其定义如下: Provide a unifield interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes 阅读全文