# Design Patten Wedge ###### tags: `Design Patten` What is "Design Pattern"? "Each pattern is a three-part rule,which express a relation between a certain context , a problem, and a solution." from Chirstopher Alexander 每一個模式都是在"某個環境"下針對"某個問題"提出的"解決方案" "Gof 23 Design Patterns"書中使用了九個屬性來描述設計模式 1,Name /Classifiction (名稱分類) - 創建類 行為類 結構類 2.Intent (意圖(目的/預期成效)) 3.Motivation (動機) 4.Applicability (適用場景) 5.Structure (物件導向架構圖(類別圖)) 6.Participants (物件實體參與者說明) 7.Collaborations (餐與者之間的互動說明) 8.Consequences (套用模式之後的優缺點) 9.Implementaitons (不同環境下的實作方法) 設計模式好處 1.提供軟體設計的客觀度良 2."再利用"的解決方式 3.確立通用術語 4.使用物件導向技巧來提升軟體品質 行為類 封裝了一個行為 注重的是演算法流程或是責任的"分配" 行為類的模式們不只描述了物件參與者,還很注重參與者們之間的互動 行為類的模式們使用繼承及多型來建構出多種不同的行為
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up