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.
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.
Related concepts
- immutable collectionkind of · An immutable collection is a collection whose membership and contents cannot be changed after creation.
- entitycontrasts with · An entity is a distinct, identifiable person, object, event, or concept represented as a unit in a data, software, or semantic model.
- valueuses · A value is the content, quantity, information, or worth attributed to an entity, property, expression, or outcome.
- Java recordproduced by · A Java record is a restricted class declaration for representing data with a fixed set of components and compiler-derived members such as constructors, accessors, and object methods.
- monitorcontrasts with · A monitor is an object-associated synchronization mechanism that provides mutual exclusion and coordinates thread waiting and notification.
- @Entitycontrasts with · The @Entity annotation is a Jakarta Persistence annotation that declares a Java class as a persistent entity mapped to stored data.
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.


