← 返回起始笔记位置

知识卡片

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

领域洞察驱动更深层的重构

理解等级:中级

原书把重构分成不同层次:微重构调整代码局部结构,向设计模式重构改善技术组织,而领域重构由新业务认识驱动,目标是让代码表达更贴近专家的模型。一次领域重构仍可由许多小步完成,每步保持功能不变并靠自动化测试降低风险;它要求开发者持续与领域专家核对“为何如此”。模式与微重构仍有用,但不能替代领域发现。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Part III: Refactoring Toward Deeper Insight · 查看原书依据

      The refactorings that have the greatest impact on the viability of the system are those motivated by new insights into the domain or those that clarify the model's expression through the code. This type of refactoring does not in any way replace the refactorings to design patterns or the micro-refactorings, which should proceed continuously. It superimposes another level: refactoring to a deeper model.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第61章《Part III: Refactoring Toward Deeper Insight》(源文件:_epub-src/0321125215_part03.html;单元01) - 结论依据:原文并列微重构、向模式重构与向更深模型重构,强调后者由领域洞察驱动,前两者仍持续进行。 - 原始内容:The refactorings that have the greatest impact on the viability of the system are those motivated by new insights into the domain or those that clarify the model's expression through the code. This type of refactoring does not in any way replace the refactorings to design patterns or the micro-refactorings, which should proceed continuously. It superimposes another level: refactoring to a deeper model.