<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Entities vs. Value Objects</title>
	<atom:link href="http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Thu, 13 Sep 2012 07:11:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Sean Chambers</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-165</link>
		<dc:creator>Sean Chambers</dc:creator>
		<pubDate>Sat, 08 Dec 2007 03:15:34 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-165</guid>
		<description>I would say just browsing at the code would give you a basic idea of how everything is composed. Depending how supple the design of the domain model would determine the ease of this. If any information is not being presented through the domain then one would need to speak to a domain expert to get a better idea of how  context is composed.

Takes on this anyone?</description>
		<content:encoded><![CDATA[<p>I would say just browsing at the code would give you a basic idea of how everything is composed. Depending how supple the design of the domain model would determine the ease of this. If any information is not being presented through the domain then one would need to speak to a domain expert to get a better idea of how  context is composed.</p>
<p>Takes on this anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-164</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sat, 08 Dec 2007 02:23:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-164</guid>
		<description>I agree that context is important. But say you start to work on an existing application. It is not immediately obvious from browsing the code what is an entity and what is not. So is some valuable information not being lost because it is not documented in the code?</description>
		<content:encoded><![CDATA[<p>I agree that context is important. But say you start to work on an existing application. It is not immediately obvious from browsing the code what is an entity and what is not. So is some valuable information not being lost because it is not documented in the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Chambers</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-163</link>
		<dc:creator>Sean Chambers</dc:creator>
		<pubDate>Wed, 05 Dec 2007 03:29:24 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-163</guid>
		<description>Joe,

I follow I think.

So what your&#039;re saying is that when dealing with value objects with changes, it doesn&#039;t change the value object but any/all related entities since the value objects are just a subset of information that is normally housed within an entity.

If I am heading down the right path here, then can all value objects be treated in this manner?

I have another question about implementation details of a value object. On my group posting, let&#039;s say I have &quot;States&quot; value objects that relate to states in the US. When I want to retrieve a list of states to display to the user would this information be accessed through the aggregate root or via a custom query that would return only these lookup values. Little off topic but this also got me thinking.</description>
		<content:encoded><![CDATA[<p>Joe,</p>
<p>I follow I think.</p>
<p>So what your&#8217;re saying is that when dealing with value objects with changes, it doesn&#8217;t change the value object but any/all related entities since the value objects are just a subset of information that is normally housed within an entity.</p>
<p>If I am heading down the right path here, then can all value objects be treated in this manner?</p>
<p>I have another question about implementation details of a value object. On my group posting, let&#8217;s say I have &#8220;States&#8221; value objects that relate to states in the US. When I want to retrieve a list of states to display to the user would this information be accessed through the aggregate root or via a custom query that would return only these lookup values. Little off topic but this also got me thinking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ocampo</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-162</link>
		<dc:creator>Joe Ocampo</dc:creator>
		<pubDate>Wed, 05 Dec 2007 02:38:16 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-162</guid>
		<description>I love this question because I get to use the phrase I know and love &quot;..it depends&quot;

Sean you are right that you have to know the context of the object in order to truly understand if it is a value object.

For instance:

Lets say that you have a Person object that contains an Address object that maps to an address table.  The Person object acts as the aggregate root and has global domain identity (their name) within the family context.  The address identity has local identity within the Person aggregate and the client has know knowledge of the ID field that is used to persist it.  Just the repository for the person aggregate.

remember that value objects are immutable, so you don&#039;t care what happens to them, where Entities are not and any change in them causes them to be in transient state.  

Using the example above.  The address class on its own  does not have any meaning to me without its container in this case the person object.  On its own I should never care if the address object changes.  In fact it should not have a repository class.  How ever if the address belongs to a Person and the address changes then it places the person in a transient state.  Make sense?

</description>
		<content:encoded><![CDATA[<p>I love this question because I get to use the phrase I know and love &#8220;..it depends&#8221;</p>
<p>Sean you are right that you have to know the context of the object in order to truly understand if it is a value object.</p>
<p>For instance:</p>
<p>Lets say that you have a Person object that contains an Address object that maps to an address table.  The Person object acts as the aggregate root and has global domain identity (their name) within the family context.  The address identity has local identity within the Person aggregate and the client has know knowledge of the ID field that is used to persist it.  Just the repository for the person aggregate.</p>
<p>remember that value objects are immutable, so you don&#8217;t care what happens to them, where Entities are not and any change in them causes them to be in transient state.  </p>
<p>Using the example above.  The address class on its own  does not have any meaning to me without its container in this case the person object.  On its own I should never care if the address object changes.  In fact it should not have a repository class.  How ever if the address belongs to a Person and the address changes then it places the person in a transient state.  Make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Chambers</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-161</link>
		<dc:creator>Sean Chambers</dc:creator>
		<pubDate>Tue, 04 Dec 2007 11:46:23 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-161</guid>
		<description>@Jason

That is actually a good question.

I would imagine at first glance you wouldn&#039;t be able to tell without knowing the context of the objects.

Perhaps Joe can shed some light on this.</description>
		<content:encoded><![CDATA[<p>@Jason</p>
<p>That is actually a good question.</p>
<p>I would imagine at first glance you wouldn&#8217;t be able to tell without knowing the context of the objects.</p>
<p>Perhaps Joe can shed some light on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-160</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 04 Dec 2007 03:01:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-160</guid>
		<description>I appreciate the difference between domain and system identity. But if I look at an entity and a value object in the domain how can I tell the difference between the two?</description>
		<content:encoded><![CDATA[<p>I appreciate the difference between domain and system identity. But if I look at an entity and a value object in the domain how can I tell the difference between the two?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ocampo</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-159</link>
		<dc:creator>Joe Ocampo</dc:creator>
		<pubDate>Thu, 29 Nov 2007 17:21:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-159</guid>
		<description>Differentiation beyond the domain context into the application context confuses a lot of people.  Hence why the Repository concept was created to address this very concern.

Domain identity should not be confused with system identity.  System identity is often need when the repository has to persist the entities to a relational database.  At that time properties or private fields have to be created in order to persist entities and value objects.

But lets say your repository were serializing to an XML file.  You wouldn&#039;t have this issue.

The key here is not to make it more complicated then it needs to be focus on the Domain first from a Domain Context use the Domain Identities as lookup values.

Using the car analogy again.  The car has global identity its VIN within my domain because me as the customer that is what matters most to me.  Within the car however the factory saw fit to Give the engine block a LOCAL identity within the car.  But to me as the consumer I can care less.  

Does this make sense?</description>
		<content:encoded><![CDATA[<p>Differentiation beyond the domain context into the application context confuses a lot of people.  Hence why the Repository concept was created to address this very concern.</p>
<p>Domain identity should not be confused with system identity.  System identity is often need when the repository has to persist the entities to a relational database.  At that time properties or private fields have to be created in order to persist entities and value objects.</p>
<p>But lets say your repository were serializing to an XML file.  You wouldn&#8217;t have this issue.</p>
<p>The key here is not to make it more complicated then it needs to be focus on the Domain first from a Domain Context use the Domain Identities as lookup values.</p>
<p>Using the car analogy again.  The car has global identity its VIN within my domain because me as the customer that is what matters most to me.  Within the car however the factory saw fit to Give the engine block a LOCAL identity within the car.  But to me as the consumer I can care less.  </p>
<p>Does this make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-158</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 29 Nov 2007 14:18:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-158</guid>
		<description>That&#039;s a very good explanation because context is king. However what I struggle with in the entity vs. value objects debate is how do the two differ when I implement them in code (and in the database). What are you thoughts on this?</description>
		<content:encoded><![CDATA[<p>That&#8217;s a very good explanation because context is king. However what I struggle with in the entity vs. value objects debate is how do the two differ when I implement them in code (and in the database). What are you thoughts on this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://lostechies.com/seanchambers/2007/11/29/entities-vs-value-objects/#comment-157</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 29 Nov 2007 14:17:22 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2007/11/28/entities-vs-value-objects.aspx#comment-157</guid>
		<description>&lt;3 -- Great link. That&#039;s quite possibly one of the best explanations for a technical problem Ive ever seen.</description>
		<content:encoded><![CDATA[<p>&lt;3 -- Great link. That's quite possibly one of the best explanations for a technical problem Ive ever seen.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
