In this post, I’ll write about a couple of thoughts regarding what domain logic is and how to distinguish it from other types of logic.
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.
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?