【正文】
樣的屬性 任何針 對屬性的聲明,應(yīng)該在現(xiàn)實世界實體的語境中加以解釋 領(lǐng)域模型中應(yīng)該包含以下屬性 a receipt收銀條 (which reports the information of a sale) ? normally includes a date and time, and ? management wants to know the dates and times of sales for a variety of reasons. ? Consequently, the Sale conceptual class needs a date and time attribute. 用關(guān)聯(lián) or 屬性 ? 屬性 ——簡單數(shù)據(jù)類型 關(guān)聯(lián) ——復(fù)雜數(shù)據(jù)類型 The type of an attribute should not normally be a plex domain concept ? such as a Sale or Airport. 屬性與代碼實現(xiàn) 領(lǐng)域模型中屬性用 Simple data type, 不意味著 OOPL中的屬性也必須 Simple, primitive data type during design and implementation work ? one of a number of possible design solutions to implement an association ? the associations between objects expressed in the domain model will often be implemented as attributes that reference other plex software objects ? this is one solution, decision should be deferred during domain modeling. 屬性 ,data type,概念類 Attribute (data type) Attributes should generally be data types. ? a UML term that implies a set of values for which unique identity is not meaningful Attribute (data type) For example, it is not (usually) meaningful to distinguish between: ? Separate instances of the Number 5. ? Separate instances of the String 39。 it is a tool of munication. 解決相似概念 登記簿 Register和 POST功能一樣。領(lǐng)域模型 概念的可視化 領(lǐng)域模型 ——概念的可視化 Content 什么是領(lǐng)域模型 概念類 識別和提取概念類 創(chuàng)建領(lǐng)域模型步驟 幾個問題 ? 命名 ? 概念類 or屬性 ? ? 相似概念問題 ? Modeling the Unreal World 不同視角的模型 Process 什么是領(lǐng)域模型 Use cases: ? important requirements analysis artifact, but are not objectoriented. ? emphasize a process view of the domain. Domain model ? The most important artifact to create in OOA 概念模型 ?領(lǐng)域模型顯示問題領(lǐng)域中對建模者有意義的概念類 ? OOA中創(chuàng)建的最重要的制品 ? 識別大量對象或概念類 —heart of OOA ?領(lǐng)域模型表達(dá)的是現(xiàn)實世界中的概念類,而不是軟件構(gòu)件(不是軟件類或帶有職責(zé)的軟件對象) ?識別概念類是問題域調(diào)查的一部分 ? UML中的類圖可以顯示領(lǐng)域模型 領(lǐng)域模型 domain model是概念類或問題領(lǐng)域中實際對象的可視化表達(dá),又稱為: ?概念模型 conceptual models ?領(lǐng)域?qū)ο竽P?domain object models ?分析對象模型 analysis object models. 使用 UML表示法,領(lǐng)域模型用一組不帶操作的類圖來表示,可顯示: ?領(lǐng)域?qū)ο蠡蚋拍铑? ?概念類之間的關(guān)聯(lián) ?概念類的屬性 部分領(lǐng)域模型 可視化字典 領(lǐng)域模型將領(lǐng)域中的單詞、概念類可視化,并將其相互關(guān)聯(lián) (比文字更容易閱讀 ) 領(lǐng)域模型顯示了視圖或抽象的一部分,而將建模者不感興趣的細(xì)節(jié)忽略。 YesA receipt has a special role in terms of the business (return bought items) ? 本次迭代未考慮退貨,因而不包括 Receipt,處理Handle Returns的迭代中再考慮 創(chuàng)建領(lǐng)域模型步驟 列出候選概念類 在領(lǐng)域模型中畫出候選概念類 添加關(guān)系 添加屬性 幾個問題 命名 mapmaker