知识卡片
交付历史与交付目标分离
原书货运模型用 Delivery Specification 描述希望达到的目的地和时间,用 Delivery History 记录货物实际经历的处理事件。历史可结合最近装卸动作及对应承运段的终点推算货物当前位置;交付成功则要求实际历史满足规格目标。这样目标变化与实际过程不被混成同一份状态。该计算是原书教学模型的设想,具体异常事件和实时定位机制未在本节给出。参见[[交付规格独立表达货物目标]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第07章|Introducing the Cargo Shipping System · 查看原书依据
Delivery History reflects what has actually happened to a Cargo, as opposed to the Delivery Specification, which describes goals. A Delivery History object can compute the current Location of the Cargo by analyzing the last load or unload and the destination of the corresponding Carrier Movement.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第49章《原书第07章|Introducing the Cargo Shipping System》(源文件:_epub-src/0321125215_ch07lev1sec1.html;图7.1)
- 结论依据:原文明确历史表示已发生事实、规格表示目标,并提出以最近装卸和相应承运段目的地计算当前位置,再判断是否达到交付目标。
- 原始内容:Delivery History reflects what has actually happened to a Cargo , as opposed to the Delivery Specification , which describes goals. A Delivery History object can compute the current Location of the Cargo by analyzing the last load or unload and the destination of the corresponding Carrier Movement .