Lessons In Domain-Driven Design - Basic Overview

Recently I wanted to gain a clear, basic overview of Domain-Driven Design, and I stumbled upon Domain-Driven Design Pattern Summaries document from http://domaindrivendesign.org/resources/what_is_ddd which is an excerpt of the book Domain-Driven Design, Addison-Wesley, by Eric Evans, 2004. The summaries document is licensed under the Creative Commons Deed: Attribution 2.0.

I also watched a presentation by Eric Evans entitled “What I learned about DDD since the book”.

After studying the material, I drew a simple diagram to illustrate the Domain Model, in a way that made sense to me.

A Domain Model is a sphere of knowledge.

A Value Object contains a number of attributes that describes an object, but does not provide a mechanism to uniquely identify it.

An Entity is essentially an object that has a specific unique identity.

An Aggregate is a composition of a number of Entities and Value Objects, with one specific Entity being the root/parent/master.

A Repository encapsulates the data access functionality of Aggregates and can emulate access to a collection of objects. The role of the Repository is to provide an object-oriented view of the persistence layer and translate the object-oriented Domain Model to the physical data store.

A Domain Service is used for processes or transformations in the domain that are not the responsibility of an Entity or Value Object.

A Domain Event is some event that occurs that is important to be noted by a Domain Expert. An event happens and the effect is that state is changed.