2009年1月14日 星期三

T05 根本的建立(2)──定義基本Component結構

在我的定義裡,所有的功能都會被定義在一個Interface裡,而功能的實作會被Component內六種不同意義的Class合作完成。為了提供所有Interface與Class的通用繼承,必須創建出基本Component的結構。

基本Component提供給外部操作的Interface命名為BaseInterface,內部的六種Interface分別為BaseImplInterface、BaseFlowInterface、BaseActionInterface、BaseModelInterface、BaseProperties與BaseExceptionInterface,繼承的關係如下面的class diagram。



BaseInterface的實作由六個內部Interface分工,不需要定義對應的Class;內部的六個Interface則需要定義六個對應的Abstract Class,同樣必須提供基本建構方法與實作ObjectInterface的方法(記得Model、Properties、Exception三類由於繼承基本類型,必須呼叫super.initialObject()與super.disposeObject())。下面是基本Component的最後class diagram。


元件庫現在的結構圖:

沒有留言:

張貼留言