《設計模式——可複用物件導向軟體的基礎》學習筆記(1.3)Describing design patterns...

鍾超發表於2011-11-26
1.What is important to describe DP
(1)Graphical notations capture the end product of the design process.
(2)We should record the decisions, alternatives, and trade-offs that led to it.


2.The way to describe DP
Each pattern is divided into sections according to the following template. The template lends a uniform structure to the information.
(1)Pattern name and Alias:名稱和別名
(2)Classification:類別,便於理解。
(3)Intent:目的
(4)Motivation:a scenario about the problem and solution.
(5)Applicability:適用性
(6)Structure:圖形的方式說明結構
(7)Participants:用到哪些類或物件,各自功能
(8)Collaborations:各Participants如何實現功能
(9)Consequences:為什麼用這個DP?從results、trade-offs等方面入手
(10)Implementation:實現該DP時要注意的pitfalls、hints和techniques
(11)Sample Code:樣例程式碼
(12)Known Uses:實際案例
(13)Related Patterns:相關DP

相關文章