samedi 13 juin 2015

Domain Model with Event Sourcing

Silly question...but why do I need a Domain model at all if I use event sourcing.

I have (an Event Bus of course) and

  • Application Services with business operations that each send a Command after basic validation
  • Command Handlers which receive Commands perform additional Command validation and publish Events
  • Event Handlers which handle Events, update the Read Model, and store the event in a Repository (the Event Source)
  • Read Model Services which provide Read Models
  • Front ends (UI or otherwise) that consume Read Models from the Read Model Services)...and utilize Application Services for business operations.

Why do I need aggregate roots and domain entities at all? What's the function of the additional layer?

Aucun commentaire:

Enregistrer un commentaire