知识卡片
领域事件表达业务缘由
领域事件包含解释一个业务事实所需的信息,建模目的是表达领域自身;事件通知以便于集成为目的,细节需查询;ECST以复制状态为目的,未必说明变化缘由。例如结婚领域事件说明与谁结婚及是否改姓,而状态传递只说明姓氏变了。单个领域事件也不保证足够重建整个实体状态。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 事件驱动架构 · 查看原书依据
domain events are somewhere between event notification and ECST messages: they both describe a significant event in the business domain, and they contain all the data describing the event. Despite the similarities, these types of messages are conceptually different. Domain events versus event notification Both domain events and event notifications describe changes in the producer’s
参考来源
- 位置:《Learning Domain-Driven Design》第15章《事件驱动架构》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch15.html)
- 结论依据:原文从建模意图和结婚示例区分三种事件,并警告领域事件并不等于状态副本。
- 原始内容:domain events are somewhere between event notification and ECST messages: they both describe a significant event in the business domain, and they contain all the data describing the event. Despite the similarities, these types of messages are conceptually different. Domain events versus event notification Both domain events and event notifications describe changes in the producer’s