← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.4.d.1.c.1.b.8

企业细分把货物类别提升为领域概念

理解等级:中级

配额要按“货物类型”判断,但原书当前 Cargo 模型还没有分类。作者没有把销售系统的关键词列表直接传遍接口,而是借 Enterprise Segment(企业细分)模式,把货物属性、起终点等维度组成可为每件 Cargo 推导的值对象。Allocation Checker 将它译成外部类别,Cargo Repository 则按同一细分查询已订数量。维度的具体定义须与领域专家确定;这是原书假设案例的建模方案,并非现成通用分类表。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第07章|Introducing a New Feature: Allocation Checking · 查看原书依据

      We need to enrich our domain model to accommodate the knowledge that there are categories of cargo. We should brainstorm with a domain expert to work out the new concept. Sometimes (as will be discussed in Chapter 11) an analysis pattern can give us an idea for a modeling solution. The book Analysis Patterns (Fowler 1996) describes a pattern that addresses this kind of problem: the ENTERPRISE SEGMENT.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第59章《原书第07章|Introducing a New Feature: Allocation Checking》(源文件:_epub-src/0321125215_ch07lev1sec11.html;图7.10) - 结论依据:原文先指出当前模型没有 Cargo 分类,再引入 Enterprise Segment 值对象,令检查器翻译类别、仓储按细分查询。 - 原始内容:We need to enrich our domain model to accommodate the knowledge that there are categories of cargo. We should brainstorm with a domain expert to work out the new concept. Sometimes (as will be discussed in Chapter 11 ) an analysis pattern can give us an idea for a modeling solution. The book Analysis Patterns (Fowler 1996) describes a pattern that addresses this kind of problem: the ENTERPRISE SEGMENT .