php - Denormalizing / projecting data in CQRS -
i'm looking cqrs (and ddd in general) , i'm not sure how implement particular part of it.
i understand benefits of separating commands , queries; let's sake of i'm using event sourcing , have nice list of history each of entities.
as understand it, data-storage views built can in form, , it's quite acceptable denormalise performance.
my question how implement transformation / projection normalised/event-centric write db view-ready / denormalised tables?
do implement events domain model, listened part of application? use sql views (this wouldn't work using rdbms/nosql mix).
how without polluting domain model various unnecessary getters?
thanks
you on right track using domain events manage read projections. aggregates not need expose internal state domain events broadcasted them contain necessary information update view projections. view projection data can stored in form.
for implementation details, take @ greg youngs cqrs example, in particular domain implementation , read model implementation.
Comments
Post a Comment