知识卡片
持续提炼可降低整体结构重构负担
整体结构改变会牵涉许多对象。持续提炼可把机制、通用子域和支撑结构从核心领域分开,使核心需要重排的内容更少。支撑元素应尽量以简单方式接入整体结构,例如通用子域放在单一责任层,或由单一组件拥有。
大型结构自身也应继续提炼:最初按表面理解划出的层,可以逐步换成真正表达基本职责的抽象。作者观察到有结构且多次良性变换的模型通常更易再调整;这是经验判断,不是必然规律。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第16章|Refactoring Toward a Fitting Structure · 查看原书依据
First, by removing mechanisms, GENERIC SUBDOMAINS, and other support structure from the CORE DOMAIN, there may simply be less to restructure.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第134章《Refactoring Toward a Fitting Structure》(源文件:_epub-src/0321125215_ch16lev1sec7.html)
- 结论依据:原文Distillation段给出减轻重构负担的机制和具体组织例子;前文将反复转变后更易改变明确表述为作者观察。
- 原始内容:I've observed that a design with a large-scale structure is usually much easier to transform than one without. This seems to be true even when changing from one kind of structure to another, say from METAPHOR to LAYERS. I can't entirely explain this. [...] But there is something more, I think, because it is even easier to change a system that has had two previous structures. [...] Another crucial force that should be applied to the model is continuous distillation. This reduces the difficulty of changing the structure in various ways. First, by removing mechanisms, GENERIC SUBDOMAINS, and other support structure from the CORE DOMAIN, there may simply be less to restructure.
- 转录说明:`[...]` 标明同段略去的解释及后续段落之间的省略;原卡术语前后的多余空格来自 EPUB 强调标签边界,已按可读正文规范转录。