← 返回刚才阅读的位置

知识卡片

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

大型结构可选且应从最小规则开始

理解等级:高级

[[大型结构应按复杂度收益选择]]:与上下文映射不同,大型结构是可选的。若系统拆成清楚的模块后已能理解,就无需再加一层全局原则;若有能显著澄清系统、又不扭曲模型的结构,才值得采用。

原书建议先用解决已出现问题的最小规则集。少量例外要标明,使开发者默认规则仍有效;例外不断增多则说明结构应调整或弃用。由此可推,采用最小规则比追求包罗万象的结构更容易保留演进空间。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第16章|Evolving Order · 查看原书依据

      Unlike the CONTEXT MAP, a large-scale structure is optional. One should be imposed when costs and benefits favor it, and when a fitting structure is found. In fact, it is not needed for systems that are simple enough to be understood when broken into MODULES. Large-scale structure should be applied when a structure can be found that greatly clarifies the system without forcing unnatural constraints on model development. Because an ill-fitting structure is worse than none, it is best not to shoot for comprehensiveness, but rather to find a minimal set that solves the problems that have emerged. Less is more. A large-scale structure can be very helpful and still have a few exceptions, but those exceptions need to be flagged somehow, so that developers can assume the structure is being followed unless otherwise noted. And if those exceptions start to get numerous, the structure needs to be changed or discarded.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第128章《Evolving Order》(源文件:_epub-src/0321125215_ch16lev1sec1.html;单元02) - 结论依据:原文指出大型结构的可选性、最小化和不合适结构的风险,并明确规定例外增多时应改变或放弃。 - 原始内容:Unlike the CONTEXT MAP, a large-scale structure is optional. One should be imposed when costs and benefits favor it, and when a fitting structure is found. In fact, it is not needed for systems that are simple enough to be understood when broken into MODULES. Large-scale structure should be applied when a structure can be found that greatly clarifies the system without forcing unnatural constraints on model development. Because an ill-fitting structure is worse than none, it is best not to shoot for comprehensiveness, but rather to find a minimal set that solves the problems that have emerged. Less is more. A large-scale structure can be very helpful and still have a few exceptions, but those exceptions need to be flagged somehow, so that developers can assume the structure is being followed unless otherwise noted. And if those exceptions start to get numerous, the structure needs to be changed or discarded. - 转录说明:原 EPUB 两段相邻,未省去正文;强调标签边界造成的术语前空格已规范转录。