知识卡片
深层模型捕捉业务关切
深层模型抓住支配业务判断的关系,而不只描述最显眼的操作。原书航运项目起初围绕货物及运输行程建模;持续与专家讨论后,团队发现他们更关心货物在托运人、承运人和收货人之间的责任转移,以及相关单据、付款流程。模型遂以责任移交为主线,仍保留有用的行程对象,却不再把移交功能勉强附在装卸操作上。
应用推断:若重要业务功能总要挂在不相干的对象或操作上,可据此检查模型是否漏掉更核心的概念;这只是建模线索,不保证每次探索都找到同样的抽象。参见 [[提炼模型要删除无用概念]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第01章|Deep Models · 查看原书依据
Features for handling these transfers of responsibility were no longer awkwardly attached to loading operations, but were supported by a model that came out of an understanding of the significant relationship between those operations and those responsibilities.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第15章《原书第01章|Deep Models》(源文件:_epub-src/0321125215_ch01lev1sec5.html)
- 结论依据:原书航运项目先围绕货物与行程建模,随后从专家视角发现责任移交更关键;原文明确说 Itinerary 未被删去,但模型重心和责任功能的归属都改变。末段检查线索是由原书“功能不再别扭地附在装卸操作上”推出,不是原项目的测试指标。
- 原始内容:The preceding example is loosely based on one of the projects that I'll be drawing on for several examples throughout the book: a container shipping system. [...] On that project, because a shipment begins with the act of booking cargo, we developed a model that allowed us to describe the cargo, its itinerary, and so on. [...] Eventually, after months of knowledge crunching, we realized that the handling of cargo, the physical loading and unloading, the movements from place to place, was largely carried out by subcontractors or by operational people in the company. In the view of our shipping experts, there was a series of transfers of responsibility between parties. [...] Rather than the logistics of the itinerary, what came to the fore were legal documents such as the bill of lading, and processes leading to the release of payments. This deeper view of the shipping business did not lead to the removal of the Itinerary object, but the model changed profoundly. Our view of shipping changed from moving containers from place to place, to transferring responsibility for cargo from entity to entity. Features for handling these transfers of responsibility were no longer awkwardly attached to loading operations, but were supported by a model that came out of an understanding of the significant relationship between those operations and those responsibilities. Knowledge crunching is an exploration, and you can't know where you will end up.