四巨头GoF的《设计模式》中23种设计模式的UML图 - 2 of 4

INTENTS AND DIAGRAMS OF 23 DESIGN PATTERNS
1: DOTV
2: PAMIB
3: SFC


*Decorator: A DECORATOR attaches additional responsibilities to a COMPONENT dynamically. DECORATORS provide a flexible alternative to subclassing for extending the COMPONENT’s functionality.

CCOR

7. Extending functionality by subclassing. 
8. Inability to alter classes conveniently. 


*Observer: Define a one-to-many dependency between one SUBJECT and many OBSERVERS so that when one SUBJECT changes state, all its dependent OBSERVERS are notified and updated automatically.
 
CCOR
6. Tight coupling. 
7. Extending functionality by subclassing. 


*Template Method: Define the skeleton of an algorithm in a template method of an ABSTRACT CLASS, deferring some steps to CONCRETE SUBCLASSES. Template Method lets subclassed CONCRETE CLASSES redefine certain steps of an algorithm defined in parent ABSTRACT CLASS without changing the algorithm's structure.


CCOR
5. Algorithmic dependencies. 

Visitor: A VISITOR encapsulates operations to be performed on the ELEMENTS of an OBJECT STRUCTURE. VISITOR lets you define a new operation without changing the classes of the elements on which it operates.
 
CCOR:
5. Algorithmic dependencies. 
8. Inability to alter classes conveniently. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值