architect-handbook

Software Architect Handbook

View on GitHub

Value Object

A small simple object, like money or a date range, whose equality isn’t based on identity.

Overview

Value Object is similar to the primitive types present in many languages that aren’t purely object oriented.

How It Works

When to Use It

Treat something as a Value Object when you’re basing equality on something other than an identity.

It’s worth considering this for any small object that’s easy to create.