<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: databases as life-support for domain objects</title>
	<atom:link href="http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/</link>
	<description>development, by example</description>
	<lastBuildDate>Mon, 19 Mar 2012 12:48:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: 2005 silk and spinach top ten &#171; silk and spinach</title>
		<link>http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/#comment-15516</link>
		<dc:creator><![CDATA[2005 silk and spinach top ten &#171; silk and spinach]]></dc:creator>
		<pubDate>Tue, 30 Jun 2009 15:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/05/23/databases-as-life-support-for-domain-objects/#comment-15516</guid>
		<description><![CDATA[[...] databases as life-support for domain objects [...]]]></description>
		<content:encoded><![CDATA[<p>[...] databases as life-support for domain objects [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: persistence stories arrive late &#171; silk and spinach</title>
		<link>http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/#comment-15510</link>
		<dc:creator><![CDATA[persistence stories arrive late &#171; silk and spinach]]></dc:creator>
		<pubDate>Tue, 30 Jun 2009 11:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/05/23/databases-as-life-support-for-domain-objects/#comment-15510</guid>
		<description><![CDATA[[...] in persistence, planning    &#171; databases as life-support for domain&#160;objects tickling email in&#160;outlook [...]]]></description>
		<content:encoded><![CDATA[<p>[...] in persistence, planning    &laquo; databases as life-support for domain&nbsp;objects tickling email in&nbsp;outlook [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin rutherford</title>
		<link>http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/#comment-155</link>
		<dc:creator><![CDATA[kevin rutherford]]></dc:creator>
		<pubDate>Tue, 28 Jun 2005 20:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/05/23/databases-as-life-support-for-domain-objects/#comment-155</guid>
		<description><![CDATA[Hi Brian,
I think we&#039;re mostly in agreement.  I too would want to make the domain objects independent of the database - just as they are independent of the garbage collector.  I guess the article is trying to say that I regard these two things as being of the same kind.  Both are technologies we&#039;ve used in building our application.

Where we do perhaps differ is in how we perceive the contents of the middle hexagon.  By putting the database into the middle hexagon I am not implying that the domain objects will necessarily depend on it.  There will be many clusters (to use a nice Eiffel term) of objects in the middle hexagon, with many and varied dependencies among them.  I&#039;m arguing that the persistence mechanism will be one such cluster, and I would hope that solid use of TDD will render it replaceable with mocks.

In &lt;a href=&quot;http://silkandspinach.wordpress.com/2005/05/23/persistence-stories-arrive-late/&quot; rel=&quot;nofollow&quot;&gt;persistence stories arrive late&lt;/a&gt; I note that the persistence model is naturaly something we&#039;ll add fairly late (assuming we&#039;re following the agile way and developing in order of decreasing value).  It seems to me that this - and TDD - will naturally lead to the domain objects being independent of their persistence architecture.
]]></description>
		<content:encoded><![CDATA[<p>Hi Brian,<br />
I think we&#8217;re mostly in agreement.  I too would want to make the domain objects independent of the database &#8211; just as they are independent of the garbage collector.  I guess the article is trying to say that I regard these two things as being of the same kind.  Both are technologies we&#8217;ve used in building our application.</p>
<p>Where we do perhaps differ is in how we perceive the contents of the middle hexagon.  By putting the database into the middle hexagon I am not implying that the domain objects will necessarily depend on it.  There will be many clusters (to use a nice Eiffel term) of objects in the middle hexagon, with many and varied dependencies among them.  I&#8217;m arguing that the persistence mechanism will be one such cluster, and I would hope that solid use of TDD will render it replaceable with mocks.</p>
<p>In <a href="http://silkandspinach.wordpress.com/2005/05/23/persistence-stories-arrive-late/" rel="nofollow">persistence stories arrive late</a> I note that the persistence model is naturaly something we&#8217;ll add fairly late (assuming we&#8217;re following the agile way and developing in order of decreasing value).  It seems to me that this &#8211; and TDD &#8211; will naturally lead to the domain objects being independent of their persistence architecture.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian andersen</title>
		<link>http://silkandspinach.net/2005/05/23/databases-as-life-support-for-domain-objects/#comment-154</link>
		<dc:creator><![CDATA[brian andersen]]></dc:creator>
		<pubDate>Mon, 27 Jun 2005 19:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/05/23/databases-as-life-support-for-domain-objects/#comment-154</guid>
		<description><![CDATA[I disagree. If you make the domain objects dependant on the database then you are effectively back to a layered architecture.  To me, the big draw to hexagonal architecture is the ability to use the domain objects anywhere in the system, especially in a rich-client.  But if your domain objects are dependent on the database you can not use them from a rich client without reverting to a two-tier design, with smart ui&#039;s connecting directly to the database.

In my experience, the best way to build your domain model for a hexagonal architecture is to start with verb-oriented &quot;command&quot; or &quot;service&quot; objects, and factor out domain objects as they are needed to avoid duplication.  For example, you might have a class called CreateAccount which contains all the data needed to create a new user account on the system.  You might also have an &quot;UpdateAccount&quot; command, and you might find that they both need the same information, then you would create a class &quot;Account&quot;.  Iff you have complex account related domain logic (as opposed to presentation or persistence logic) you should add it to your account class.

It sounds a little like you are headed back to the layered, or even client-server architecture if you don&#039;t keep your persistence code at a good distance from your domain logic.]]></description>
		<content:encoded><![CDATA[<p>I disagree. If you make the domain objects dependant on the database then you are effectively back to a layered architecture.  To me, the big draw to hexagonal architecture is the ability to use the domain objects anywhere in the system, especially in a rich-client.  But if your domain objects are dependent on the database you can not use them from a rich client without reverting to a two-tier design, with smart ui&#8217;s connecting directly to the database.</p>
<p>In my experience, the best way to build your domain model for a hexagonal architecture is to start with verb-oriented &#8220;command&#8221; or &#8220;service&#8221; objects, and factor out domain objects as they are needed to avoid duplication.  For example, you might have a class called CreateAccount which contains all the data needed to create a new user account on the system.  You might also have an &#8220;UpdateAccount&#8221; command, and you might find that they both need the same information, then you would create a class &#8220;Account&#8221;.  Iff you have complex account related domain logic (as opposed to presentation or persistence logic) you should add it to your account class.</p>
<p>It sounds a little like you are headed back to the layered, or even client-server architecture if you don&#8217;t keep your persistence code at a good distance from your domain logic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

