知识卡片
抽象核心不能按跨模块引用频率机械提取
把“被其他模块引用最多的类”自动搬进公共包,容易造出没有领域意义的杂物堆。抽象核心要靠理解关键概念及其在主要交互中的角色,通常需要显著重新设计。
若同项目还有随认知演进的核心提炼文档,两者应呈现相近的大图景;抽象核心是代码,因而比简短文档更严格、完整。应用推断:文档的一致性可作为理解线索,却不能替代代码模型的语义验证。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第15章|Abstract Core · 查看原书依据
The process of factoring out the ABSTRACT CORE is not mechanical. For example, if all the classes that were frequently referenced across MODULES were automatically moved into a separate MODULE, the likely result would be a meaningless mess. Modeling an ABSTRACT CORE requires a deep understanding of the key concepts and the roles they play in the major interactions of the system. In other words, it is an example of refactoring to deeper insight. And it usually requires considerable redesign. The ABSTRACT CORE should end up looking a lot like the distillation document (if both were used on the same project, and the distillation document had evolved with the application as insight deepened). Of course, the ABSTRACT CORE will be written in code, and therefore more rigorous and more complete.