Tag Value Object
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.
Value Objects and Error Messages
I haven’t done one of these for a while. This post is a review of a code submitted by a reader.
Using Value Objects to represent technical concerns
I was asked a question recently which I find quite interesting. It is actually a part of a code review request (which I’ll cover next week) but I decided to elevate it to its own blog post.
.NET Value Type (struct) as a DDD Value Object
I got a suggestion recently about using .NET structs to represent DDD Value Objects to which I repeated what I’ve been saying and writing for several years now: structs are not a good choice for DDD Value Objects. But then I realized that I never actually dove into the details of why it is so.
So here it is, the blog post where we’ll talk about using .NET Value Types (structs) as DDD Value Objects and what effect it has on the domain model, performance, and mapping the model to the database using ORMs.
Value Object: a better implementation
This post is about a better implementation of Value Object.
Value Objects: when to create one?
In this post, we’ll discuss Value Objects. Specifically, when to introduce them into your code.
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.