O'Reilly logo

Implementing Domain-Driven Design by Vaughn Vernon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Change Tracking

By the definition of Entity, it is not necessary to track the changes that occur on state over its lifetime. We have to support only its continuously changing state. However, sometimes domain experts care about important occurrences in the model as time passes. When that’s the case, tracking specific changes to Entities can help.

The most practical way to achieve accurate and useful change tracking is with Domain Events and an Event Store. We create a unique Event type for every important state-altering command executed against every Aggregate that domain experts care about. The combination of the Event name and its properties makes the record of change explicit. The Events are published as the command methods complete. A subscriber ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required