Tag Entity

Entity Identity vs Database Primary Key

Today, we’ll discuss the difference between identity in the DDD sense and database primary keys. We often mix the two together but are they really the same thing?

Value Objects and Identity

Today’s article is an answer to a reader’s question about the use of Value Objects to represent the identity of an entity.

Nesting a Value Object inside an Entity

In this post, we are going to look at what to do if you are not able to treat some concept in your domain as a Value Object and have to make it an Entity. TL;DR: create a nested Value Object inside that Entity and relocate as much domain logic to that Value Object as possible.

Representing a collection as a Value Object

I was reviewing the list of topic ideas lately and found this question in the discussion to my DDD in Practice Pluralsight course. While I answered it - somewhat briefly - in the discussion thread, I think it’s worth a separate detailed blog post. The question itself goes like this: "Can you have a collection of Value Objects abstracted as a Value Object itself?" Or, in other words, can you represent a collection as a Value Object?

Classes internal to an aggregate: entities or value objects?

While such classes as Person and Money are pretty intuitive and can be easily attributed to either entities or value objects, the choice isn’t so obvious when it comes to classes that are internal to an aggregate. That is classes that aren’t roots of their own aggregates but rather parts of existing ones.

Entity vs Value Object: the ultimate list of differences

The topic described in this article is a part of my Domain-Driven Design in Practice Pluralsight course. I wrote about entities and value objects some time ago. In this post, I’d like to talk about differences between Entity vs Value Object in more detail. I know, the topic isn’t new and there are a lot of articles on the Internet discussing it already. Nevertheless, I didn’t find any with an exhaustive, comprehensive description, so I decided to create my own.

DTO vs Value Object vs POCO

In this article, I’d like to clarify the differences in DTO vs Value Object vs POCO where DTO stands for Data Transfer Object, and POCO is Plain Old CLR Object, also known as POJO in Java environment.