.net - Domain Model with Event Sourcing -
silly question...but why need domain model @ if use event sourcing.
i have (an event bus of course) and
- application services business operations each send command after basic validation
- command handlers receive commands perform additional command validation , publish events
- event handlers handle events, update read model, , store event in repository (the event source)
- read model services provide read models
- front ends (ui or otherwise) consume read models read model services)...and utilize application services business operations.
why need aggregate roots , domain entities @ all? what's function of additional layer?
sounds may doing bit in command handler. clear - role of command handler receive command, load appropriate aggregate , send command aggregate. grabs events aggregate may have generated persists them , publishes them. here diagram have on blog.
for fuller step step overview of typical cqrs + es application have @ post: cqrs + event sourcing - step step overview
i hope clears things you. ps. may want take @ how create aggregate root cqrs , es. can find post here
Comments
Post a Comment