← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.4.d.1.c.1.b.6.a

交付历史与交付目标分离

理解等级:中级

原书货运模型用 Delivery Specification 描述希望达到的目的地和时间,用 Delivery History 记录货物实际经历的处理事件。历史可结合最近装卸动作及对应承运段的终点推算货物当前位置;交付成功则要求实际历史满足规格目标。这样目标变化与实际过程不被混成同一份状态。该计算是原书教学模型的设想,具体异常事件和实时定位机制未在本节给出。参见[[交付规格独立表达货物目标]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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 .