2007年9月8日 星期六

D28 細部設計的流程(Model)

在元件設計的階段裡,是將局部的功能需要以類似一個小型系統的方式加以設計。記錄下來的物件關係模型如下面附圖。流程與動作的主軸與基本觀念是一致的,但是Properties的輸入由ComponentImpl來使用;ComponentController使用的Component Model因為封裝而改由ComponentImpl傳來。

◎一個ComponentImpl由一個或一個以上的ComponentController組合而成
◎每個ComponentImpl使用一組Properties與一種ComponentModel
◎每個ComponentControllerl有一個或一個以上的ComponentAction(可能沒有)
◎每個ComponentController有可能傳回Return Code(可能沒有)
◎每個ComponentController都應該定義無法處理的Exception狀況(可能沒有)
◎每個例外狀況可以使用其他的ComponentAction或經由ComponentImpl拋出去註:這裡的Component也有可能是一段程式碼。


每個Component在設計時都有Class Diagram與Sequence Diagram,設計的同時每個Class都要定義屬性與方法,同時附上註解。Class會存在於Package(通常等同於Component的範圍),所以每個Package也會有一張Class Diagram來描述有哪些Class。

追溯關係則至少有三種:Component Controller與Component Action的使用關係。此外,訊息、參數與例外的內容應有清單與影響的關係追溯。
◎系統的目標:

沒有留言:

張貼留言