Event sourcing and Domain Event

479 views Asked by At

What is Event sourcing and what is Domain Event.

I read both the articles and I am not be able to get it properly. So, please describe it in easy words.

And what is the difference between them?

Are domain events and event driven are same?

1

There are 1 answers

0
VoiceOfUnreason On BEST ANSWER

Not your fault: the literature is a mess.

Domain events, event sourcing, and event driven are three different ideas that happen to share the label "event".

Domain events are a domain modeling pattern; in effect making "things that happen" a first class citizen in your domain model. Think BookSold, not MouseClicked

Event sourcing is a data modeling pattern; instead of having a domain entity with mutable properties, we have a domain entity with a history of changes.

Event driven is a communication pattern; system A publishes an event, and system B reacts. Notice that system A and system B don't even need to know about each other; the only need a common undertanding of the event, and shared plumbing (aka middleware).