← 返回刚才阅读的位置

知识卡片

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

决策支持层把偏好政策移出运输能力

理解等级:高级

航运教学例继续发现 Router 不描述当前运营或已有运力,而是帮助订舱员选路,于是增设 Decision Support 层。原模型把 is preferred 放在 Transport Leg 上,用于偏向自有船只或优惠合作方;这其实是决策政策,并非航段运力本身。

图16.7–16.8将它提为 Route Bias Policy,由 Router 使用。这样航段只表达可运输能力,偏好规则也变得明确。层的命名不是事后贴标签,而是推动模型纠正概念混放。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第130章《Responsibility Layers》(源文件:_epub-src/0321125215_ch16lev1sec3.html;单元03) - 结论依据:原文解释Router和“is preferred”的不同职责,并记录把偏好提为Route Bias Policy的模型修订;图16.7–16.8对应前后状态。 - 原始内容:The references within this model are all consistent with the three layers except for one discordant element: the "is preferred" attribute on Transport Leg. This attribute exists because the company prefers to use its own ships when it can, or the ships of certain other companies with which it has favorable contracts. The "is preferred" attribute is used to bias the Router toward these favored transports. This attribute has nothing to do with "Capability." It is a policy that directs decision making. To use the new RESPONSIBILITY LAYERS, the model will have to be refactored. [...] This factoring makes the Route Bias Policy more explicit while making Transport Leg more focused on the fundamental concept of transportation capability. - 转录说明:原 EPUB 强调标签边界产生的术语前空格已规范转录;`[...]` 标明图16.7及段落间省略。