Value Characteristics
As a first order of business, make certain when modeling a domain concept as a Value Object that you are addressing the Ubiquitous Language. Consider this to be an overarching principle and a characteristic that must be achieved. I imply this principle throughout the chapter.
When you are trying to decide whether a concept is a Value, you should determine whether it possesses most of these characteristics:
• It measures, quantifies, or describes a thing in the domain.
• It can be maintained as immutable.
• It models a conceptual whole by composing related attributes as an integral unit.
• It is completely replaceable when the measurement or description changes.
• It can be compared with others using Value equality.
• It ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access