Jason
Jason

Reputation: 2076

How is ApplicationEvent different from DomainEvent?

In the DDD Sample, Cargo Tracking application, there are "ApplicationEvents" and DomainEvents.

ApplicationEvents examples: "cargoHasArrived", "cargoWasMishandled"

DomainEvent example: "HandlingEvent.LOAD", "HandlingEvent.RECEIVE", "HandlingEvent.UNLOAD",etc.

How are application and domain events supposed to be different semantically and what are some guidelines you use to determine if it goes in ApplicationEvent or DomainEvent?

Upvotes: 2

Views: 196

Answers (1)

Martin4ndersen
Martin4ndersen

Reputation: 2876

Application Events are characteristic to the specific Use Case/User Story. They model application (not domain) behavior.

Technically Domain Events are the same. Difference is on the mental level - Domain Events model facts that takes place in domain model.

https://code.google.com/p/ddd-cqrs-sample/wiki/DomainDrivenDesignBusinessDeveloperMentalModel

Upvotes: 4

Related Questions