《設計模式——可複用物件導向軟體的基礎》學習筆記(1.5)Organizing the catalog...
1.Classify DPs by purpose.
(1)Creational DP: the process of object creation.
Factory Method, Abstract Factory, Builder, Prototype, Singleton
(2)Structural DP: composition of classes or objects.
Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
(3)Behavioral DP: the way in which classes or objects interact and distribute responsibility.
Interpreter, Template Method, Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Visitor.
2.Classify DPs by scope
(1)Class DP: Deal with relationships between classes and their subclasses.
Factory Method, Adapter(Class), Interpreter, Template Method.
(2)Object DP: Deal with object relationships, which can be changed at run-time and are more dynamic.
Abstract Factory, Builder, Prototype, Singleton, Adapter(Object), Bridge, Composite, Decorator, Facade, Flyweight, Proxy, Chain of Responsibility, Command, Iterator, Mediator, Memonto, Observer, State, Strategy, Visitor
3.Classify DPs by purpose and scope.
(1)Creational Class DPs: Defer some part of object creation to subclasses.
Factory Method.
(2)Creational Object DPs: Defer some part of object creation to compose classes.
Abstract Factory
Builder
Prototype
Singleton
(3)Structural Class DPs: Use inheritance to compose classes.
Adapter(Class)
(4)Structural Object DPs: Describe ways to assemble objects.
Adapter(Object)
Bridge
Composite
Decorator
Facade
Flyweight
Proxy
(5)Behavioral Class DPs: Use inheritance to describe algorithms.
Interpreter
Template Method
(6)Behavioral Object DPs: Describe how a group of objects cooperate to perform a task that no single object can carry out alone.
Chain of Responsiblity
Command
Iterator
Mediator
Memento
Observer
State
Strategy
Visitor
4.Having multiple ways of thinking about patterns will deepen your insight into what they do, how they compare, and when to apply them.
(1)Creational DP: the process of object creation.
Factory Method, Abstract Factory, Builder, Prototype, Singleton
(2)Structural DP: composition of classes or objects.
Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
(3)Behavioral DP: the way in which classes or objects interact and distribute responsibility.
Interpreter, Template Method, Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Visitor.
2.Classify DPs by scope
(1)Class DP: Deal with relationships between classes and their subclasses.
Factory Method, Adapter(Class), Interpreter, Template Method.
(2)Object DP: Deal with object relationships, which can be changed at run-time and are more dynamic.
Abstract Factory, Builder, Prototype, Singleton, Adapter(Object), Bridge, Composite, Decorator, Facade, Flyweight, Proxy, Chain of Responsibility, Command, Iterator, Mediator, Memonto, Observer, State, Strategy, Visitor
3.Classify DPs by purpose and scope.
(1)Creational Class DPs: Defer some part of object creation to subclasses.
Factory Method.
(2)Creational Object DPs: Defer some part of object creation to compose classes.
Abstract Factory
Builder
Prototype
Singleton
(3)Structural Class DPs: Use inheritance to compose classes.
Adapter(Class)
(4)Structural Object DPs: Describe ways to assemble objects.
Adapter(Object)
Bridge
Composite
Decorator
Facade
Flyweight
Proxy
(5)Behavioral Class DPs: Use inheritance to describe algorithms.
Interpreter
Template Method
(6)Behavioral Object DPs: Describe how a group of objects cooperate to perform a task that no single object can carry out alone.
Chain of Responsiblity
Command
Iterator
Mediator
Memento
Observer
State
Strategy
Visitor
4.Having multiple ways of thinking about patterns will deepen your insight into what they do, how they compare, and when to apply them.
相關文章
- 設計模式:可複用物件導向軟體及基礎:4-7 物件行為模式:備忘錄模式(Memento)設計模式物件
- 程式設計基礎·Java學習筆記·物件導向(下)程式設計Java筆記物件
- (Java筆記)物件導向基礎Java筆記物件
- 菜鳥學習筆記:Java基礎篇1(基礎語法、物件導向)筆記Java物件
- [筆記]物件導向的程式設計筆記物件程式設計
- Python3:物件導向程式設計學習筆記(2)Python物件程式設計筆記
- C#學習筆記(六)——物件導向程式設計簡介C#筆記物件程式設計
- python基礎(物件導向程式設計)Python物件程式設計
- python物件導向程式設計基礎Python物件程式設計
- 【python 物件導向】 python物件學習筆記《1》Python物件筆記
- Python 3 學習筆記之——物件導向Python筆記物件
- Flutter學習筆記(8)--Dart物件導向Flutter筆記Dart物件
- Python學習筆記|Python之物件導向Python筆記物件
- js高階 物件導向 學習筆記JS物件筆記
- 【設計模式筆記】(零)- 物件導向的六大原則設計模式筆記物件
- JS物件導向設計模式JS物件設計模式
- 軟體設計師:物件導向技術物件
- 【JavaScript筆記 · 基礎篇(十)】物件導向程式設計之三:繼承機制JavaScript筆記物件程式設計繼承
- java基礎 韓順平老師的 物件導向(基礎) 自己記的部分筆記Java物件筆記
- C語言大型軟體設計的物件導向C語言物件
- 物件導向-設計模式-建立型物件設計模式
- Python學習之物件導向程式設計Python物件程式設計
- 物件導向筆記物件筆記
- js-物件導向-設計模式-命令模式JS物件設計模式
- JAVA物件導向基礎--物件導向介紹Java物件
- Python基礎入門(6)- 物件導向程式設計Python物件程式設計
- Java基礎-物件導向基礎Java物件
- 設計模式學習筆記設計模式筆記
- 學習筆記-設計模式筆記設計模式
- JavaScript-設計模式-物件導向程式設計JavaScript設計模式物件程式設計
- JavaScript設計模式之物件導向程式設計JavaScript設計模式物件程式設計
- Python物件導向基礎:設定物件屬性Python物件
- Python學習之路——類-物件導向程式設計Python物件程式設計
- 1.設計模式與物件導向設計模式物件
- 物件導向-設計模式-行為型物件設計模式
- 物件導向-設計模式-結構型物件設計模式
- 物件導向設計原則和模式物件模式
- Go語言結構體(struct)物件導向程式設計基礎篇Go結構體Struct物件程式設計
- Java零基礎學習之路(八)Java物件導向Java物件