← 返回刚才阅读的位置

知识卡片

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

抽象核心不能按跨模块引用频率机械提取

理解等级:高级

把“被其他模块引用最多的类”自动搬进公共包,容易造出没有领域意义的杂物堆。抽象核心要靠理解关键概念及其在主要交互中的角色,通常需要显著重新设计。

若同项目还有随认知演进的核心提炼文档,两者应呈现相近的大图景;抽象核心是代码,因而比简短文档更严格、完整。应用推断:文档的一致性可作为理解线索,却不能替代代码模型的语义验证。

这张卡片看不懂?

已有反馈 · 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.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第124章《Abstract Core》(源文件:_epub-src/0321125215_ch15lev1sec8.html;单元01) - 结论依据:原文明确反对按引用频率机械搬类,要求深入理解与较大幅度重设计,并比较抽象核心和提炼文档。 - 原始内容: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. - 转录说明:原 EPUB 强调标签边界造成的术语前空格已规范转录。