知识卡片
统一模型先删除错误隐含义
原书的教学比喻继续修正粗糙模型:象会移动时,“树干”不能再解释腿;模型转向“动物、腿、鼻、身体、尾”的关系。统一模型的关键是最小化错误隐含义,并随新需求与理解逐步深化。原书认为,宁可暂缺“喷水”能力,也不要保留“毒牙”这种错误性质。
图示是对原书图14.12的简化重绘,表示概念关系,并非实际软件系统结构;正文提到的 Body 并未画在原图中:
classDiagram
Animal <|-- Elephant
Animal --> Leg : supported by
Elephant --> Trunk : attached
Animal --> Tail : attached
若只要定位大象,跨模型翻译位置足够;无须为尚未出现的需求过早建完统一模型。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第14章|Unifying an Elephant · 查看原书依据
This second pass of model integration tends to slough off incidental or incorrect aspects of the individual models and creates new conceptsin this case, "animal" with parts "trunk," "leg," "body," and "tail"each of which has its own properties and clear relationships to other parts. Successful model unification, to a large extent, hinges on minimalism. An elephant trunk is both more and less than a snake, but the "less" is probably more important than the "more.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第113章《Unifying an Elephant》(源文件:_epub-src/0321125215_ch14lev1sec12.html;单元02)
- 结论依据:原文图14.12和正文展示从粗糙拼合到动物及身体部分的模型,并强调剔除不正确的原模型性质。
- 原始内容:This second pass of model integration tends to slough off incidental or incorrect aspects of the individual models and creates new conceptsin this case, "animal" with parts "trunk," "leg," "body," and "tail"each of which has its own properties and clear relationships to other parts. Successful model unification, to a large extent, hinges on minimalism. An elephant trunk is both more and less than a snake, but the "less" is probably more important than the "more."