← 返回刚才阅读的位置

知识卡片

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

模式名称让领域设计有经济的共同语言

理解等级:高级

只说“万物都是对象”,不足以让团队高效讨论领域模型的职责和组织方式。作者用房屋的“厨房、卧室、浴室”作类比:这些模式名在短句中压缩了功能、基础设施和使用习惯,减少重复解释。

软件领域模式名也应进入团队语言,帮助表达已知设计选择。类比只说明共同词汇的作用,不能把房屋空间规则直接套入软件。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第143章附录《The Use of Patterns in This Book》(源文件:_epub-src/0321125215_app01.html) - 结论依据:原文以房屋空间命名类比领域模式词汇的压缩作用,并说明模式名应成为团队语言。 - 原始内容:To stop with "Everything is an object" would be like a carpenter or an architect summing up houses by saying "Everything is a room." There would be the big room with high-voltage outlets and a sink, where you might cook. There would be the small room upstairs, where you might sleep. It would take pages to describe an ordinary house. People who build or use houses realize that rooms follow patterns, patterns with special names, such as "kitchen." This language enables economical discussion of house design. [...] The pattern names are meant to become terms in the language of the team, and I've used them that way in this book. - 转录说明:`[...]` 标明两个非连续原文段落之间的省略。