四巨头GoF的《设计模式》中23种设计模式的UML图 - 4 of 4
2013-01-25 21:31
609 查看
Singleton: Ensure a SINGLETON class only has one instance, and provide a global point of access to it.
State: Allow a CONTEXT object to alter its behavior when its internal STATE changes. The CONTEXT object will appear to change its class.
*Strategy: A STRATEGY defines a family of algorithms, encapsulate each one, and make them interchangeable by holding a STRATEGY in a CONTEXT. Strategy lets the algorithm vary independently
from clients that use it.
CCOR
5. Algorithmic dependencies.
7. Extending functionality by subclassing.
Facade: A FA?ADE provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
CCOR
6. Tight coupling.
*Factory Method: A CREATOR defines an interface for creating an object in a factory method, but let a subclassed CONCRETE CREATOR decide which class to instantiate. Factory Method lets a
class defer instantiation to subclasses.
CCOR
1. Creating an object by specifying a class explicitly.
Flyweight: A FLYWEIGHT FACTORY uses sharing in a pool to support large numbers of fine-grained CONCRETE FLYWEIGHT objects efficiently.
Chain of Responsibility: Avoid coupling the sender of a request to its receiver by giving more than one HANDLER object a chance to handle the request. The HANDLER chains the receiving objects
by holding a successor HANDLER and pass the request along the chain until an object handles it.
CCOR
2. Dependence on specific operations.
6. Tight coupling.
7. Extending functionality by subclassing.
Command: A CONCRETE COMMAND encapsulates a request action in a RECEIVER as a CONCRETE COMMAND object, thereby letting an INVOKER parameterize clients with different requests, queue or log
requests, and support undoable operations in CONCRETE COMMANDS.
CCOR
2. Dependence on specific operations.
6. Tight coupling.
*Composite: A COMPOSITE composes COMPONENT objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual LEAF objects and compositions of COMPOSITE
objects uniformly.
CCOR
7. Extending functionality by subclassing.
State: Allow a CONTEXT object to alter its behavior when its internal STATE changes. The CONTEXT object will appear to change its class.
*Strategy: A STRATEGY defines a family of algorithms, encapsulate each one, and make them interchangeable by holding a STRATEGY in a CONTEXT. Strategy lets the algorithm vary independently
from clients that use it.
CCOR
5. Algorithmic dependencies.
7. Extending functionality by subclassing.
Facade: A FA?ADE provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
CCOR
6. Tight coupling.
*Factory Method: A CREATOR defines an interface for creating an object in a factory method, but let a subclassed CONCRETE CREATOR decide which class to instantiate. Factory Method lets a
class defer instantiation to subclasses.
CCOR
1. Creating an object by specifying a class explicitly.
Flyweight: A FLYWEIGHT FACTORY uses sharing in a pool to support large numbers of fine-grained CONCRETE FLYWEIGHT objects efficiently.
Chain of Responsibility: Avoid coupling the sender of a request to its receiver by giving more than one HANDLER object a chance to handle the request. The HANDLER chains the receiving objects
by holding a successor HANDLER and pass the request along the chain until an object handles it.
CCOR
2. Dependence on specific operations.
6. Tight coupling.
7. Extending functionality by subclassing.
Command: A CONCRETE COMMAND encapsulates a request action in a RECEIVER as a CONCRETE COMMAND object, thereby letting an INVOKER parameterize clients with different requests, queue or log
requests, and support undoable operations in CONCRETE COMMANDS.
CCOR
2. Dependence on specific operations.
6. Tight coupling.
*Composite: A COMPOSITE composes COMPONENT objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual LEAF objects and compositions of COMPOSITE
objects uniformly.
CCOR
7. Extending functionality by subclassing.
相关文章推荐
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 1 of 4
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 2 of 4
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 3 of 4
- GOF 23种设计模式 : Gang Of Four 四人组.
- 追mm与23种gof设计模式【转载】
- 23种GoF设计模式简要概述
- [转]为什么GOF的23种设计模式里面没有MVC?
- GoF23种设计模式之行为型模式之责任链模式
- GoF23种设计模式之行为型模式之策略模式
- 非23种GOF设计模式之简单工厂模式
- GoF23种设计模式之行为型模式之中介者模式
- GoF23种设计模式之创建型模式之抽象工厂模式
- GoF23种设计模式之结构型模式之组合模式
- GoF23种设计模式之行为型模式之责任链模式
- 一句话总结GOF的23种设计模式
- GoF23种设计模式之结构型模式之代理模式
- GoF23种设计模式之行为型模式之策略模式
- GOF23种设计模式之Builder Pattern
- 设计模式(十一)------23种设计模式(4):建造者模式(生成器模式)
- Java:GOF的23种设计模式(下)