Value Objects

Pattern: Value Object

Value objects unlike Entity objects have no conceptual identity in the Bounded Context

Value object attributes | behavior does not map directly to the core concepts in the Bounded Context

Value objects get created in process memory; are NOT persisted and destroyed when not needed

  • No Conceptual Identity
  • They are Immutable
  • Attributes & Operations
  • Lifecycle - Non persistent
  • Meaningful in the context of Entity “A value object cannot live on its own”

A value object in one bounded context may be an Entity in another bounded context !!

In the illustration below Account entity from Accounts context is a value object in the Compliance context.

tactical-patterns