知识卡片
规格对象可声明规则而由机制执行组合
原书给出另一种建议性例子:若核心领域需要清晰声明 Specification(规格对象),可由聚焦框架负责构建规格并提供比较、组合等基本操作。领域模型保留“规则是什么”的表述,框架承担组合和比较的繁琐实现。
这里的 Specification 框架是原书提出的可能设计,不是本章实际项目结果;规则含义仍须由领域模型给出,不能由通用组合器替代。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第15章|Cohesive Mechanisms · 查看原书依据
Another example of a COHESIVE MECHANISM would be a framework for constructing SPECIFICATION objects and supporting the basic comparison and combination operations expected of them. By employing such a framework, the CORE DOMAIN and GENERIC SUBDOMAINS can declare their SPECIFICATIONS in the clear, easily understood language described in that pattern (see Chapter 10). The intricate operations involved in carrying out the comparisons and combinations can be left to the framework.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第122章《Cohesive Mechanisms》(源文件:_epub-src/0321125215_ch15lev1sec6.html;单元02)
- 结论依据:原文将 Specification 构建、比较和组合框架作为另一示例,并让领域模型以清晰语言声明规格。
- 原始内容:Another example of a COHESIVE MECHANISM would be a framework for constructing SPECIFICATION objects and supporting the basic comparison and combination operations expected of them. By employing such a framework, the CORE DOMAIN and GENERIC SUBDOMAINS can declare their SPECIFICATIONS in the clear, easily understood language described in that pattern (see Chapter 10). The intricate operations involved in carrying out the comparisons and combinations can be left to the framework.
- 转录说明:原 EPUB 强调标签边界造成的标点前空格已规范转录。