ARJUN PATEL
ARJUN PATEL

Reputation: 117

Event sourcing and Domain Event

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?

Upvotes: 1

Views: 629

Answers (1)

VoiceOfUnreason
VoiceOfUnreason

Reputation: 57367

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).

Upvotes: 2

Related Questions