January 2018
Beginner to intermediate
312 pages
7h 22m
English
We’ve now got a basic understanding of how to model the domain types and workflows, so let’s move on and look at an important way of classifying data types based on whether they have a persistent identity or not.
In DDD terminology, objects with a persistent identity are called Entities and objects without a persistent identity are called Value Objects. Let’s start by discussing Value Objects first.
In many cases, the data objects we’re dealing with have no identity—they’re interchangeable. For example, one instance of a WidgetCode with value “W1234” is the same as any other WidgetCode with value “W1234.” We don’t need to keep track of which one is which—they’re equal to each other.
In F# we might demonstrate ...
Read now
Unlock full access