Defining Entities, Value Objects, and Aggregate Roots

One of the most important considerations that we face in implementing a project which is backed by Domain-Driven design is that we must be able to express its Strategic Patterns in both code and architectural constraints.  If we do not define that framework up front, we are not setting the team up for success.  Even within that framework, there is a central set of concepts that are required ahead of others, as they will both be built upon and extended, as we introduce other concepts.  To that end, we will begin by taking a look at Entities, Value Objects, and Aggregate Roots.

Continue Reading

The Trouble with the Always-Valid Entity

There is no better way than to kick off a new blog with a bit of controversy. When it comes to Domain-Driven Design, there is no greater divergence in interpretation and opinion than what is meant by the "always-valid entity" and how it is actually implemented. Even amongst the consummate experts, how validity and validation are put into practice can vary greatly. Over the years, I have slowly drifted between the different camps, finding that one interpretation better fit one project than the next. However, I now find myself wondering if the solution is not really as black-and-white as it has been presented.

Continue Reading