← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.1.a.2.a.3.g.4

责任层取舍看业务叙事概念依赖与变化剪切

理解等级:高级

选择责任层时可检查三个特征(原书未规定固定顺序):

  1. 业务叙事:层名能否说明领域现实与优先级?
  2. 概念依赖:上层概念能依托下层成立,而下层不依赖上层吗?
  3. 变化剪切:变化速度或来源不同的对象是否被自然分开?

这些是原书建议保留的特征,不是先定层名再强迫对象就位。结构可在试验中合并、拆分、重命名;起点可以不完美,但错误起点会增加改造成本。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第130章《Responsibility Layers》(源文件:_epub-src/0321125215_ch16lev1sec3.html;单元04–05) - 结论依据:原文在“Choosing Appropriate Layers”列出Storytelling、Conceptual dependency、Conceptual contours三项特征,并允许层随实验演进。 - 原始内容:Finding good RESPONSIBILITY LAYERS, or any large-scale structure, is a matter of understanding the problem domain and experimenting. If you allow EVOLVING ORDER, the initial starting point is not critical, although a poor choice does add work. The structure may well evolve into something unrecognizable. So the guidelines suggested here should be applied when considering transformations of the structure as much as when choosing from scratch. [...] Storytelling. The layers should communicate the basic realities or priorities of the domain. [...] Conceptual dependency. The concepts in the "upper" layers should have meaning against the backdrop of the "lower" layers, while the lower-layer concepts should be meaningful standing alone. [...] CONCEPTUAL CONTOURS. If the objects of different layers should have different rates of change or different sources of change, the layer accommodates the shearing between them. - 转录说明:原 EPUB 强调标签边界产生的术语前空格已规范转录,列表小标题后的换行转录为空格;`[...]` 标明各段省略。