<?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: DDD &#8211; Making meaningful relationships</title>
	<atom:link href="http://lostechies.com/colinjack/2008/10/28/ddd-making-meaningful-relationships/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/colinjack/2008/10/28/ddd-making-meaningful-relationships/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Tue, 24 Aug 2010 06:44:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Nuno Lopes</title>
		<link>http://lostechies.com/colinjack/2008/10/28/ddd-making-meaningful-relationships/#comment-6</link>
		<dc:creator>Nuno Lopes</dc:creator>
		<pubDate>Thu, 12 Feb 2009 10:00:42 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colinjack/archive/2008/10/28/ddd-making-meaningful-relationships.aspx#comment-6</guid>
		<description>&quot;In the case of an association between a Client and an Account the relationship probably belongs to the Client aggregate.&quot;

Most probably it belongs to the account :)

Client - Account

You have to ask yourself which is more specific. Is it the account or the client?

If you have a one to one relationship between both, most probably both concepts would be collapased into one (Either client or Account). The Domain Expert would tell what is the most meaningfull name.

Now if the Client may open several accounts then it is another matter.

For instance a bank account. When a loan is approved you the client states which account will be used to make payments.

So you have:

Client-Loan-Account
Client-Loan-Payment-Account

If you state that the relationship belongs to the Client (composition pattern). Then by definition all operations related to the account would be put in the Clien class. You would be in a BIG MESS.

Usually the most specific carries the buiness load.

Unless your concept of belongs is meaningless.

Read Streamlined Object Modeling.

Have fun,

Nuno</description>
		<content:encoded><![CDATA[<p>&#8220;In the case of an association between a Client and an Account the relationship probably belongs to the Client aggregate.&#8221;</p>
<p>Most probably it belongs to the account <img src='http://lostechies.com/colinjack/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Client &#8211; Account</p>
<p>You have to ask yourself which is more specific. Is it the account or the client?</p>
<p>If you have a one to one relationship between both, most probably both concepts would be collapased into one (Either client or Account). The Domain Expert would tell what is the most meaningfull name.</p>
<p>Now if the Client may open several accounts then it is another matter.</p>
<p>For instance a bank account. When a loan is approved you the client states which account will be used to make payments.</p>
<p>So you have:</p>
<p>Client-Loan-Account<br />
Client-Loan-Payment-Account</p>
<p>If you state that the relationship belongs to the Client (composition pattern). Then by definition all operations related to the account would be put in the Clien class. You would be in a BIG MESS.</p>
<p>Usually the most specific carries the buiness load.</p>
<p>Unless your concept of belongs is meaningless.</p>
<p>Read Streamlined Object Modeling.</p>
<p>Have fun,</p>
<p>Nuno</p>
]]></content:encoded>
	</item>
</channel>
</rss>
