Featured Post

Event Sourcing Video from Michael Ploed

Event Sourcing I want to share a great video I found few days ago that describes very well what Event Sourcing is.

Wednesday, February 14, 2018

DDD components

In DDD there are four components to take into consideration:


An entity is something identifieble and addressable with a unique identifier. It represents a specific object in the domain that may evolves and changes over time. Changes need to be tracked and maintained by making entities searchable and distinct from other entities.

Value Object

A value object is important for the attributes it transports.  It does not refer to a particular object that the domain naturally is composed by. 
Value object has a set of properties that capture a specific aspect of the domain.
Value object has to be "side effect free": they do not have to be modified because of every aspect captured has to be preserved immutable.


A repository takes care of every ope9ration that discovers entities from their storage ( database, in memory location, file system). Its responsobility is also parks entity into one or multiple storages depending of your needs.


A service takes care of domain aspects that are out of the scope of  an entity. It usually collaborates with repository to fetch entities and uses entitities to do actions that makes value for the domain.
At design time a service can be identified when an operation involves two or more entities.

Futher details in new posts.

No comments :

Post a Comment