Mike Liu 2207ea4ce9
Translation zh (#1646)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

* add bridege and DI pattern

* fix issue #1600

* add converter,proxy,visitor pattern

* add caching,composite,delegation,dirty-flag,interpreter patterns

* add dao and producer-consumer

* add dto and provate class data pattern

* fix #1646 png path problems

* fix #1646 composite png path case problem

Co-authored-by: Mike <admin@xiaod.info>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-02-08 21:07:48 +05:30
..
2021-02-08 21:07:48 +05:30

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Delegation delegation /patterns/delegation/ Structural
Decoupling

或称

代理模式

目的

它是一种让对象将某种行为向外部表达,但实际上将实现该行为的责任委托给关联对象的技术。

类图

alt text

适用性

使用委托模式以实现以下目的

  • 降低类的耦合性
  • 组件的行为相同,但是意识到这种情况将来可能会改变。

鸣谢