Review: domain-driven design distilled, Vaughn Vernon

Domain-Driven Design Distilled

The book starts with an interesting definition of design, paraphrasing Steve Jobs:

Design is not just what it looks like and feels like. Design is how it works.

And from there he defines the principles of Domain-Driven Design in areas that affect the strategic design and the tactical design of an application, being strategic the areas related to business drivers and concerns and tactical related with implementation.

Strategic Design

The actors here would be everyone involved in a given project, thus he defined the importance of having a ubiquitous language and the definition of the bounded contexts.  This is achieved through Event Storms session and the objective is to have a clear understanding of what the software does in a common language used by all involved.

The other strategic design concern is the use of Context Mapping, helping understand the importance of having clear interfaces between your bounded context and the outside world.

Particularly interesting here are the strategies are the use of context mapping when you already on a project that evolved into a “big ball of mud” and want to use domain-driven design.

tactical design

Once you have your bounded contexts defined with the commands and events he describes how to use Aggregates, that are basically your data using 4 clear rules:

  1. Protect your business invariants inside your aggregate boundaries
  2. Design small aggregates
  3. Reference other aggregates by identifier
  4. Update other aggregates using eventual consistency.

The definition of what are Domain Events and Event Source give you a clear idea that maintaining all events on record gives you the advantage to understand not only how your users are behaving but also a powerful tool to debug and maintain the system.

He finishes with a example of what a Event Storm session would work, what ties all the above together as it’s good to see those concepts in practice!

Conclusion:

If you haven’t head at all about Domain-Driven Design or have very little knowledge about it, this is a good book to start with. It explains all the concepts in a linear way, giving you a clear understanding of what to expect in each of the phases of a DDD project.