← 返回刚才阅读的位置

知识卡片

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

局部修改检验模型贴合度

理解等级:高级

连续几次重构后,若新需求通常只改动局部操作或对象、不会震动多个广泛概念,可以把这种局部性当作模型贴近领域边界的迹象。若需求迫使大量对象和方法重新拆分,就应回查对领域的理解,并据此深化模型。

这个检验要观察实际变化的方向,不能保证未来需求都能局部实现;“改动少”也不自动证明模型正确。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第10章|Conceptual Contours · 查看原书依据

      Even when the design follows CONCEPTUAL CONTOURS, there will need to be modifications and refactoring. When successive refactoring tends to be localized, not shaking multiple broad concepts of the model, it is an indicator of model fit. Encountering a requirement that forces extensive changes in the breakdown of the objects and methods is a message: Our understanding of the domain needs refinement.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第76章《Conceptual Contours》(源文件:_epub-src/0321125215_ch10lev1sec4.html;单元02) - 结论依据:原文把连续重构中的局部变化称为模型贴合的指标,把大面积重新划分视为深化领域理解的信号,而非未来变化的保证。 - 原始内容:Even when the design follows CONCEPTUAL CONTOURS , there will need to be modifications and refactoring. When successive refactoring tends to be localized, not shaking multiple broad concepts of the model, it is an indicator of model fit. Encountering a requirement that forces extensive changes in the breakdown of the objects and methods is a message: Our understanding of the domain needs refinement.