知识卡片
口头排演模型交互
口头建模是用模型中的对象、关系和交互讲出一个具体场景,听出表达中的含糊或别扭,再把更清晰的说法反馈给设计。它把[[用语言暴露模型缺陷]]落实为一次可重复的演练:
- 让团队成员不用数据库操作或界面步骤代替领域关系,大声描述模型如何完成场景。
- 比较几种说法:哪一句只讲技术动作,哪一句虽完整却冗长,哪一句清楚指出对象之间的约束。
- 把更顺畅的概念组合带回图和代码,与草图、分析及运行代码时发现的问题交叉检验。
原书教学例子:航运路线的说法从“把停靠点写入数据库”,改为“服务返回行程”,最后收敛为“Routing Service 找到满足 Route Specification 的 Itinerary”。这是作者用来比较表达清晰度的构造例子,并非某项目量化验证结果;说得顺口仍须检查模型是否符合业务。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第02章|Modeling Out Loud · 查看原书依据
One of the best ways to refine a model is to explore with speech, trying out loud various constructs from possible model variations. Rough edges are easy to hear.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第18章《原书第02章|Modeling Out Loud》(源文件:_epub-src/0321125215_ch02lev1sec2.html)
- 结论依据:原文明确建议大声试说不同模型构造,并以三种路线服务说法比较含糊、冗长与简洁;节末要求用模型元素和交互描述场景,把更好的表达带回图与代码。卡片把口头演练的判断步骤与原书例子区分开。
- 原始内容:One of the best ways to refine a model is to explore with speech, trying out loud various constructs from possible model variations. Rough edges are easy to hear. ... "A Routing Service finds an Itinerary that satisfies a Route Specification ." ( concise ) ... Find easier ways to say what you need to say, and then take those new ideas back down to the diagrams and code.