liveBook · Manning

Value object

A value object is an object whose meaning and equality derive from its attribute values rather than an independent identity, typically with immutable state.

How 3 Manning books explain it

Unit Testing Principles, Practices, and Patterns

A value object is an immutable object identified solely by its content rather than by an individual identity.

How it is used
Guides dependency substitution and output-based testing by separating immutable values from mutable state.
How deep it goes
Defines identity and immutability, then shows .NET equality implementation; it stops short of broader construction guidance.
Examples
Uses the integer 5, Product.Shampoo, FileUpdate, and audit-file instructions as concrete value examples.
What you can do after
Apply value equality to simplify output assertions and avoid substituting immutable dependencies with test doubles.

Read how Unit Testing Principles, Practices, and Patterns explains value object →

Java Persistence with Spring Data and Hibernate epub

A developer-defined value type is an application-defined class whose instances are identified by their values rather than independent persistent identity.

How it is used
Models application-defined data that belongs to an entity rather than requiring independently identified persistence.
How deep it goes
Defines identity and lifecycle rules, then follows embeddable components into table layout and save/delete behavior; it does not specify equality-method implementations.
Examples
Contrasts shared and separately owned addresses, then places home and billing addresses in one user table row.
What you can do after
Apply it via JPA embeddable components when data has one owner and needs no independent persistent identity.

Read how Java Persistence with Spring Data and Hibernate epub explains value object →

The Joy of JavaScript

An immutable object whose equality and identity are determined by its attribute values rather than by a stable external identifier.

How it is used
Represents domain values such as money, dates, points, lines, and decimals within composable application code.
How deep it goes
Defines design rules and demonstrates JavaScript freezing, sealing, equality, arithmetic, and primitive conversion.
Examples
Uses Money, DateTime, Point, Line, Decimal, coordinate mutation, and currency-specific arithmetic examples.
What you can do after
Build it from scratch as a sealed, frozen JavaScript object with value-based equality and composable operations.

Read how The Joy of JavaScript explains value object →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.