Event sourcing applies to the write store in a system where commands are handled and events are persisted to record changes to domain models. It allows flexible domain models to be defined by domain experts and improves concurrency for occasionally connected systems by storing a system's full sequence of state changes, like in a version control system.
2. Where does ES apply?
Queries Persistent View Model
Denormalizer
Publish
Command
Input Handler Persist
UI
Validation Validation
Rules Write store
3. Where does ES apply?
Queries Persistent View Model
Denormalizer
Publish
Command
Input Handler Persist
UI HERE!
Validation Validation
Rules Write store
5. Behavioral models
Shipping
Order Line Item X Line Item Y
Info
Created Added Added
Added
6. One model to rule
them all
Shipping
Order Line Item X Line Item Y Line Item Y
Info
Created Added Added Removed
Added
7. One model to rule
them all
What ever model your domain expert
can dream up
Shipping
Order Line Item X Line Item Y Line Item Y
Info
Created Added Added Removed
Added
8. Effects on domain
models
• No getters and setters
• Easy testing without mocks
• Enforces the “Aggregate roots as the
consistency boundary” concept
9. Effects on teams
Event
Persistent
Domain
View model
Command DTO
Client
13. Thanks for listening!
Andreas Öhlund - Frontwalker
Enterprise Development Expert
andreas.ohlund@it-arkitekterna.se
http://andreasohlund.net
Notas del editor
\n
\n
\n
\n
Where do we do DDD? (business critical apps, competitive advantage)\nCan always give the BA’s what they want\n\nStructural model: WE need to predict what the business wants in the future (impossible)\n\nLittle investment up front\n\nIntent is not lost, no need to reverse engineer things\n