四巨头GoF的《设计模式》中23种设计模式的UML图 - 4 of 4
来源:互联网 发布:租房上哪个网站好 知乎 编辑:程序博客网 时间:2024/06/03 17:11
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.
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 4 of 4
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 1 of 4
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 2 of 4
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 3 of 4
- GoF的设计模式
- GoF的23种设计模式名称
- 戏说GOF的23种设计模式
- GoF的23种设计模式
- GoF设计模式的概括
- GoF设计模式的分类:
- GOF 23个基本的设计模式
- GOF 23个基本的设计模式
- GoF的23个经典设计模式
- GoF 的23个经典设计模式
- GOF设计模式---23种
- GOF 23种设计模式
- GoF+23种设计模式
- JDK里的设计模式Examples of GoF Design Patterns
- JQuery学习之--5,弹出层效果
- C# 学习笔记 数据库 简介 (书:C#与.NET4 第21章上)
- 可用于电子书阅读器的开源阅读器软件项目
- 读《C++沉思录》第一章有感
- Junit 第一讲:Junit中方法的执行顺序
- 四巨头GoF的《设计模式》中23种设计模式的UML图 - 4 of 4
- 实用Linux命令(3)备份、压缩与解压缩
- 如何处理Oracle中的坏块
- 关于allegro16.6 orCAD capture CIS 创建网表出现错误的问题解决方法
- sscanf和sprintf函数用法总结
- HDOJ1326 Box of Bricks
- 一个普通码农所体会的程序之道
- Struts2中的ModelDriven机制
- LA 3177 长城守卫(推理+二分)