知识卡片
深层重构延伸微观重构
常规微观重构由开发者在编码时发现局部改进点,通过测试验证;它应持续进行。要得到更深的领域洞见,还需进入业务场景、换角度看已有模型,并保持与领域专家的连续对话。
这三项活动给重构提供更宽的知识背景,使模型变动能反映业务理解,而不只是整理代码结构。原书在本章开头列出方向,具体启动与实施条件由后续小节展开。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter Thirteen. Refactoring Toward Deeper Insight · 查看原书依据
The classic refactoring scenario involves a developer or two sitting at the keyboard, recognizing that some code can be improved, and then changing it on the fly (with unit tests to verify their results, of course). This practice should happen all the time, but it isn't the whole story.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第91章《Chapter Thirteen. Refactoring Toward Deeper Insight》(源文件:_epub-src/0321125215_ch13.html;单元01)
- 结论依据:原文列出身处领域、换角度观察、持续对话三项重点,并说明前五章扩展了传统的单元测试支持下的微观重构。
- 原始内容:The classic refactoring scenario involves a developer or two sitting at the keyboard, recognizing that some code can be improved, and then changing it on the fly (with unit tests to verify their results, of course). This practice should happen all the time, but it isn't the whole story.