Working With Value Objects
page 1 of 3
Published: 12 Jul 2011
Unedited - Community Contributed
Abstract
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
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 19990/ 74

Introduction

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
Comment:
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
http://stevesmithblog.com/blog/common-design-patterns-resources/
Title: object   
Name: vijay
Date: 2011-07-15 8:10:18 AM
Comment:
nice article






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


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-08 8:00:46 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search