← Graph

Don't Conflate Entity, Handler and Projection

takeaway 2 connections

Avoid the aggregate-root-as-god-class pattern. Keeping entity, handler, and projection as separate classes preserves event sourcing's big testability wins: you can test entities in isolation without events, test projections by feeding an entity, prior state, and an event, and test handlers by controlling the current entity and asserting on what was written.

type
recommendation
takeaway Don't Conflate Entity, Handler and Projection
about
Directly addresses the fourth anti-pattern.
takeaway Don't Conflate Entity, Handler and Projection
from_talk
Recommendation from the fourth anti-pattern.

Provenance

Read by
6 extractions