知识卡片
抽象核心承载关键概念与主要交互
抽象核心的设计方式是:识别最根本的领域概念,写成具体类、抽象类或接口,让它们表达重要组成部分之间的大多数交互,并把这套整体模型放在独立模块。各子域模块保留专门实现类,通常引用抽象核心,而不直接依赖其他专门模块。
这样读者可从较小的抽象模型看见核心概念和关系,再深入各子域细节。它仍是代码中的模型,需要足够严谨地约束交互;不是只为画简图而增添一层包装。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第15章|Abstract Core · 查看原书依据
Identify the most fundamental concepts in the model and factor them into distinct classes, abstract classes, or interfaces. Design this abstract model so that it expresses most of the interaction between significant components. Place this abstract overall model in its own MODULE, while the specialized, detailed implementation classes are left in their own MODULES defined by subdomain. Most of the specialized classes will now reference the ABSTRACT CORE MODULE but not the other specialized MODULES. The ABSTRACT CORE gives a succinct view of the main concepts and their interactions.