知识卡片

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

知识级避免全定制和完全通用两个极端

理解等级:高级

组织结构和关联规则经常变化:为每个组织单独定制软件,维护成本高;允许任意关系的完全通用模型,则难用且无法执行本组织政策。若把所有配置选项直接加在业务对象上,类型引用与条件分支会不断膨胀。

知识级让“关于模型的模型”单独承载可配置约束。采用范围应聚焦确实需要变化的规则,保持领域语义明确。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第16章|Knowledge Level · 查看原书依据

      In an application in which the roles and relationships between ENTITIES vary in different situations, complexity can explode. Neither fully general models nor highly customized ones serve the users' needs. Objects end up with references to other types to cover a variety of cases, or with attributes that are used in different ways in different situations. Classes that have the same data and behavior may multiply just to accommodate different assembly rules.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第131章《Knowledge Level》(源文件:_epub-src/0321125215_ch16lev1sec4.html) - 结论依据:原文列出静态模型、完全通用模型、逐组织定制的局限,并提出分离自描述部分。 - 原始内容:In an application in which the roles and relationships between ENTITIES vary in different situations, complexity can explode. Neither fully general models nor highly customized ones serve the users' needs. Objects end up with references to other types to cover a variety of cases, or with attributes that are used in different ways in different situations. Classes that have the same data and behavior may multiply just to accommodate different assembly rules.