知识卡片

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

用语言暴露模型缺陷

理解等级:中级

持续使用通用语言,能把模型的不准确之处暴露出来:

  1. 在讨论场景和写代码时坚持使用模型术语,让含糊、别扭或缺失的表达显现。
  2. 领域专家指出业务含义不对的词或结构,开发者指出会妨碍设计的歧义或矛盾;共同试验替代说法。
  3. 新说法若改变概念含义,就同步修订模型,并按需重命名类、方法、模块或调整行为。

术语变化因此是模型变化,而非只改文案。参见 [[共同语言贯穿交付媒介]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第02章|Ubiquitous Language · 查看原书依据

      These changes to the language will be recognized as changes in the domain model and will lead the team to update class diagrams and rename classes and methods in the code, or even change behavior, when the meaning of a term changes.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第17章《原书第02章|Ubiquitous Language》(源文件:_epub-src/0321125215_ch02lev1sec1.html) - 结论依据:原文说持续使用语言会暴露模型弱点,团队用替代说法试验;变化应反映到模型、类图、类名、方法和必要的行为上,并分别要求专家和开发者指出不充分或不一致之处。步骤据原文依赖整理。 - 原始内容:Persistent use of the UBIQUITOUS LANGUAGE will force the model's weaknesses into the open. The team will experiment and find alternatives to awkward terms or combinations. ... These changes to the language will be recognized as changes in the domain model and will lead the team to update class diagrams and rename classes and methods in the code, or even change behavior, when the meaning of a term changes.