Value objects

Unlike entities, value objects are immutable and used as descriptors for model elements. They are known to the system only by their characteristics, and they don't need to have unique identifiers. They are always associated with other objects (for example, Delivery Address in the sales order can be a value object) and it is consistently associated with sales order context; otherwise, it doesn't have any meaning.

The preceding diagram depicts the basic concept of a value object along with an example, and the following diagram is a sample class representation of entity and value object:

The following list describes the characteristics of value objects:

  • They describe the properties and characteristics within a problem domain
  • They do not have an identity
  • They are immutable, that is, the content of the object cannot be changed; instead, properties modeled as value objects must be replaced
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset