Working With Value Objects
page 1 of 3
Published: 12 Jul 2011
Unedited - Community Contributed
Some objects in your application simply describe attributes of other objects. These objects can be modeled as Value Objects, immutable and without identity. In this article, Steve introduces Value Objects and shows an example of how to implement them in a simple design.
by Steven Smith
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 20803/ 32


A Value Object is an object that has no unique identity, but rather represents a characteristic of something else.  For instance, the integer 7 can be used anywhere and always means the same thing - we don't think about this or that particular instance of the integer 7.  Likewise, a given date like 11 July 2011 (GMT) is the same everywhere - it has no additional identity.  In designing systems, it's useful to identify parts of the design that should be represented as Value Objects, as opposed to Entities, which each have a unique identity.

View Entire Article

User Comments

Title: More Design Patterns   
Name: Steve Smith
Date: 2011-07-15 11:50:34 AM
I talk more about design patterns on my blog where I have a ton of links to more resources. Check it out here:
Common Design Patterns - Resources
Title: object   
Name: vijay
Date: 2011-07-15 8:10:18 AM
nice article

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-06-15 10:39:45 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search