K.Value Object
Motivation
To create a small simple object, like money or a date range, whose equality isn't based on identity.
Summary
Value Object is usually the smaller; it's similar to the primitive types present in many languages that aren't purely object-oriented.
The key difference between reference and value objects lies in how they deal with equality. A reference object uses identity as the basis for equality
When to Use
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.
Overview Tutorials
Implementation
.NET has a first-class treatment of Value Object. In C# an object is marked as a Value Object by declaring it as a struct instead as a class.
The environment then treats it with value semantics.
Example
Money or Date Range object
Related Patterns
Data Transfer Object : are some time treated as Value Object.
Embedded Value
Serialized LOB
Related Technologies
None
References
None