Chapter 9 领域模型
Chapter 9 领域模型
Sample UP Artifact Relationships Sale 1 Sales Modeling quantity the domain ob attributes. and associations some terms in that undergo state changes Use-Case Model Operation: enteritem() 1. Customer arrives Post-conditions. ments 3. Cashier enters names of em ide Operation Contracts classes in Use Case Text the des Register Producte emlD, quanti Design spec=getProductSpec( itemID)+ addLineltem( spec, guar
Process Sale 1. Customer arrives ... 2. ... 3. Cashier enters item identifier. 4.... Use Case Text Operation: enterItem(…) Post-conditions: - . . . Operation Contracts Sale date . . . Sales LineItem quantity 1 1..* . . . . . . the domain objects, attributes, and associations that undergo state changes Domain Model Use-Case Model Design Model : Register enterItem (itemID, quantity) : ProductCatalog spec = getProductSpec( itemID ) addLineItem( spec, quantity ) : Sale . . . conceptual classes in the domain inspire the names of some software classes in the design conceptual classes – terms, concepts attributes, associations Cashier: … Item ID: … ... Glossary elaboration of some terms in the domain model Requirements Business Modeling Design Sample UP Artifact Relationships
目标 口处理当前迭代相关的概念类 口创建初始的领域模型 口为模型建立适当的属性和关联
目标 处理当前迭代相关的概念类 创建初始的领域模型 为模型建立适当的属性和关联
定义:什么是领域模型 口领域模型( Domain model)是对领域内概念类的可视化表 小 为什么要创建领域模型 提高模型的抽象层次,减少我们的思维和软件模型之间的表示差 距。同时促进对领域问题的理解 ¤领域模型也称为概念模型、领域对象模型、分析对象模型 可视化字典。 口通过∪ML表示法,领域模型被描述为一组没有定乂操作的 类图,提供了概念透视图。他可以展示: 领域对象或概念类 ■概念类之间的关联 概念类的属性
定义:什么是领域模型 领域模型(Domain Model)是对领域内概念类的可视化表 示。 ◼ 为什么要创建领域模型 提高模型的抽象层次,减少我们的思维和软件模型之间的表示差 距。同时促进对领域问题的理解 领域模型也称为概念模型、领域对象模型、分析对象模型、 可视化字典。 通过UML表示法,领域模型被描述为一组没有定义操作的 类图,提供了概念透视图。他可以展示: ◼ 领域对象或概念类 ◼ 概念类之间的关联 ◼ 概念类的属性
领域模型不是软件对象的模型 ■比如,在领域模型中,不会有窗口或数据表之类的对 象,也不会有职责或方法 Sales Database software artifact; not p of domain model software class; not pal date of domain model time printo
领域模型不是软件对象的模型 ◼ 比如,在领域模型中,不会有窗口或数据表之类的对 象,也不会有职责或方法