知识卡片

普通读书笔记卡 · 1971.o.1.b.1.a.1.a.2

模型语言揭示重规划条件

理解等级:中级

原书构造两段货运系统对话说明模型术语如何改善需求讨论。旧说法围绕数据库行、布尔标记和重跑服务;用户关心的“无须重做行程就不要重做”难以直接表达。新说法区分“航线规格”(期望路线条件)与“行程”(当前路线),于是双方能说清:规格变更后,先判断现有行程是否仍满足它;只有不满足才重新规划。

这两段对话是原书为对比而设计的示例,不是项目实测。其价值在于让业务约束成为可讨论的模型关系,而非只描述数据库操作。参见 [[通用语言以模型为骨架]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第17章《原书第02章|Ubiquitous Language》(源文件:_epub-src/0321125215_ch02lev1sec1.html;图 2.1–2.2) - 结论依据:原书两段特意平行构造的对话分别围绕 shipment 表操作与 Route Specification/Itinerary 概念;第二段以“行程是否仍满足规格”作为重新规划条件,结尾明确说明这些对话是有意构造的比较,并称模型术语使讨论更简洁。 - 原始内容:Then, whenever you change anything in the Spec , we'll see if the Itinerary still satisfies the Specification . If it doesn't, we'll have the Routing Service regenerate the Itinerary . ... These two dialogs were deliberately constructed to closely parallel each other. ... The domain-model-based terminology of the second design makes the second dialog more concise.