← 返回刚才阅读的位置

知识卡片

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

先隔离核心再逐步整理剩余模块

理解等级:高级

航运教学例抽取 Delivery 后,原 Shipping 包只是“剩下的一切”,并不自动成为有意义的模块。图15.4随后把外围整理为 Customer、Logistics、Money 等不同职责,其中有通用子域,也有航运特定的支持模块。

原书说这可经过多轮重构,不必一次完成;Customer 最终是否能成为通用子域仍取决于后续模型认识。故“核心隔离完成”与“全部外围模块设计完成”是两个不同里程碑。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第123章《Segregated Core》(源文件:_epub-src/0321125215_ch15lev1sec7.html;单元03) - 结论依据:原文指出抽出核心后剩余 Shipping 包仍需后续重构,图15.4给出不同支持模块,并保留 Customer 的未来不确定性。 - 原始内容:Now that we have a SEGREGATED CORE, the refactoring is complete. But the Shipping package we are left with is just "everything left over after we pulled out the CORE." We can follow up with other refactorings to get more communicative packaging, as shown in Figure 15.4. [...] It might take several refactorings to get to this point; it doesn't have to be done all at once. Here, we've ended up with one SEGREGATED CORE package, one GENERIC SUBDOMAIN, and two domain-specific packages in supporting roles. Deeper insight might eventually produce a GENERIC SUBDOMAIN for Customer, or it might end up more specialized for shipping. - 转录说明:`[...]` 标明图注及段落间省略;原 EPUB 强调标签边界造成的术语前空格已规范转录。