领域建模(系统操作复习)

习题

问题

考察点

领域建模

识别概念类

固定模板

Conceptual Class Category

Examples

specifications,designs, or descriptions of things 

roles of people

containers of other things

things in a container

abstract noun concepts

organizations

events

processes

(often not represented as a concept, but may be)

rules and policies

catalogs

模板解析 

Conceptual Class Category

Examples

specifications,designs, or descriptions of things 

规格、设计或对事物的描述用例中的信息

Information

Arrangement

TeacherInformation

roles of people

角色(人物)用户、

System Administrator...

Teacher

System Administrator

containers of other things

things in a container

容器

容器里的东西

(Course、Exam)书架和书的关系

abstract noun concepts

抽象名词概念(Arrangement、Schedule)状态、许可、窗口等

organizations

组织哪里需要用到(Exam)

events

事件

发生了什么事(Arrange、Return)填写动词

processes

(often not represented as a concept, but may be)

流程
(通常不表示为概念,但可能是)
干了什么,通常是方法(ArrangingExam、ReturnBook)动宾短语

rules and policies

规则和政策

有什么规则

(ArrangeRules

PublishRules)就是上面动作+规则rules

catalogs

分类

哪些分类(Arrangement Catalog)你这个用例中的主体+catalog

在领域模型中的"Conceptual Class Category"部分,您应根据概念类的特性将其归类到上述提供的类别之一。下面是每个类别简要说明及填充示例:

  1. Specifications, Designs, or Descriptions of Things:

    • 包含对事物特性的定义或描述。例如,在设计一个图书管理系统时,“BookSpecification”可以是一个概念类,用来描述书籍的规格或标准。
  2. Roles of People:

    • 表示人(用户、参与者)在系统或业务流程中扮演的角色。例如,“Customer”,“Librarian”。
  3. Containers of Other Things:

    • 代表能够包含其他对象的实体。例如,“ShoppingCart”可以是一个容器类,里面包含了多个“CartItem”。
  4. Things in a Container:

    • 容器内的具体项目。如前例中的“CartItem”。
  5. Abstract Noun Concepts:

    • 抽象概念,通常不直接映射为物理对象,但对理解领域至关重要。比如,“Membership”表示会员资格。
  6. Organizations:

    • 组织结构或实体。例如,“School”,“Department”。
  7. Events:

    • 发生在系统中或由系统触发的重要状态改变。例如,“OrderPlaced”,“PaymentProcessed”。
  8. Processes (often not represented as a concept, but may be):

    • 业务流程或操作序列,虽然通常不直接作为概念类,但在某些情况下可能需要抽象为类来管理其状态或规则,如“OrderProcessingWorkflow”。
  9. Rules and Policies:

    • 系统或业务遵循的规定或策略。例如,“ShippingPolicy”,定义了货物运送的规则。
  10. Catalogs:

    • 集合或分类信息的列表。例如,“ProductCatalog”列出了所有可销售的产品。

在填写时,您应分析并确定每个概念类最适合的类别,以便更清晰地组织和表达领域模型的结构。

示例

Conceptual Class Category

Examples

specifications, designs, or descriptions of things

Weapon, Damage, GameMode

roles of people

Character, Enemy

为概念类添加联系

Category(根据实际需要选择)

Examples(当中涉及到的概念为上述表格中所提到的,不一定都是依据具体情况而言)

A is a logical part of B

BlogState -> Blog

A is logically contained in B

Image,Video -> BlogText

Title、Author、Date -> Blog

A is a description for B

ReviewDescription -> Review

PublishDescription -> Publish

A is known/logged/recorded/

reported/captured in B

Blog -> BlogCatalogs

Input window -> Blog

Input window -> BlogText

A is a member of B

Blog -> BlogCatalogs

A is an organizational subunit of B

A uses or manages B

BlogText -> Blog

BlogState -> Blog

Administrator -> Review

Blog -> Publish

Student->AcademicSystem;

A is descibed by B

UserSpecification -> SystemAdministrator

Review -> ReviewRules

Publish -> PublishRules

Blog -> BlogDecription

Blogger -> UserSpecrification

A is initiated by B

Blog -> Blogger

A records activities of B

Blog -> BlogCatalog

A is a transaction related to another transaction B

Arrangement -> Schedule

在领域模型中为概念类添加联系时,您需要明确描述不同概念类之间的关系本质。根据您提供的联系类型提示,这里是如何填写或描述这些联系的一些建议:

  1. A is a logical part of B

    • 描述:表示A是B的一个组成部分,A的存在依赖于B,且A不能脱离B而独立存在。
    • 填写示例:“引擎(Engine)是汽车(Car)的一个逻辑组成部分。”
  2. A is logically contained in B

    • 描述:意味着A作为实体被B所包含,但A相对独立,可能有自己独立的生命周期。
    • 填写示例:“章节(Chapter)逻辑上包含于书籍(Book)中。”
  3. A is a description for B

    • 描述:表示A是用来描述B特征或属性的类。
    • 填写示例:“产品规格(ProductSpecification)是对产品的描述。”
  4. A is known/logged/recorded/reported/captured in B

    • 描述:说明B记录或保存了关于A的信息。
    • 填写示例:“交易记录(TransactionRecord)记录了购买行为(Purchase)的细节。”
  5. A is a member of B

    • 描述:表明A属于B的集合或群体中的一员。
    • 填写示例:“员工(Employee)是公司(Company)的成员。”
  6. A is an organizational subunit of B

    • 描述:指出A是B在组织结构中的下级单位。
    • 填写示例:“市场部门(MarketingDepartment)是公司(Company)的组织子单元。”
  7. A uses or manages B

    • 描述:说明A使用或负责管理B。
    • 填写示例:“系统管理员(SystemAdmin)管理着服务器资源(ServerResource)。”
  8. A is described by B

    • 描述:类似于“A is a description for B”,但强调B描述了A。
    • 填写示例:“用户评价(UserReview)描述了商品(Product)的质量。”
  9. A is initiated by B

    • 描述:表示B触发或启动了A的动作或过程。
    • 填写示例:“订单处理(OrderProcessing)由客户下单(CustomerOrderPlacement)发起。”
  10. A records activities of B

    • 描述:说明A记录或跟踪B的活动。
    • 填写示例:“日志文件(LogFile)记录了系统操作(SystemOperation)的活动。”
  11. A is a transaction related to another transaction B

    • 描述:表示A和B是相关的交易或事件,可能在业务流程中有依赖或关联。
    • 填写示例:“退款(RefundTransaction)与原始购买(OriginalPurchaseTransaction)相关联。”

通过这种方式填写,您可以清晰地表达出领域模型中概念类之间的逻辑关系和交互方式。

示例 

Category

Examples

A is a description for B

TecherInformation->Teacher

Schedule->Arrangement

Exam->Arrangement

A is known/logged/recorded/

reported/captured in B

Arrangement -> Arrangement Catalog

A is a member of B

Course Information -> Exam

Arrangement Information -> System

Arrangement -> Arrangement Catalog

A is rules or policies of B

PublishRules -> Publish

ArrangeRules-> Arrange

A is an organizational subunit of B

A uses or manages B

Teacher -> Arrangement

Teacher -> Course

System Administrator -> Arrangement

A is a transaction related to another transaction B

Arrangement -> Schedule

Category

Examples

A is logically contained in B

Weapon--Character

Weapon--Enemy

 Damage--Weapon

A is a description for B

Activity Description -> Activity

A is a member of B

Weapon--Character

Weapon--Enemy

A uses or manages B

Character--Weapon

Enemy--Weapon

添加概念类属性并画出领域模型图

识别概念类中的概念为一个独立的节点,为概念类添加联系中的关系描述词作为链路,画出领域建模图

示例 (注意需要标明是1对多,还是多对1)

问题:

  1.  联系需要方向
  2.  属性需要类型

process不用画

我的答案

不一定对,绞尽脑汁想出来的

1.识别概念类

概念类是一种名词,识别概念类的策略:

Conceptual Class Category

Examples

specifications, designs, or descriptions of things

BookSpecification

roles of people

Reader

containers of other things

things in a container

Bookshelf

BorrowRecordsCollection

Book

BorrowRecord

abstract noun concepts

BorrowStatus

events

Borrow

Return

processes

(often not represented as a concept, but may be)

BorrowBook

ReturnBook

rules and policies

BorrowRules

ReturnRules

catalogs

BookCatalog

2 为概念类添加联系

Category

Examples

A is a description for B

BookSpecification ->Book

BorrowStatus->BorrowRecord

A is known/logged/recorded/

reported/captured in B

Book->BookCatalog

BorrowRecord->BorrowRecordsCollection

A is a member of B

Book->BookCatalog

A is rules or policies of B

BorrowRules->Borrow

ReturnRules->Return

A uses or manages B

Reader->Borrow

Reader->Return

A is located/placed on/in B

Book->Bookshelf

A is initiated by B

Borrow->Reader

Return->Reader

A is performed on B

Borrow->Book

Return->Book

A records the occurrence of B

BorrowRecord->Borrow

3 添加概念类属性并画出领域模型图

  • 21
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值