<?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: Controlled initialization of domain objects</title>
	<atom:link href="http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/</link>
	<description>...another view on the web and how it's built</description>
	<lastBuildDate>Mon, 28 Nov 2011 10:34:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Giorgio Sironi</title>
		<link>http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/comment-page-1/#comment-1285</link>
		<dc:creator>Giorgio Sironi</dc:creator>
		<pubDate>Mon, 13 Jul 2009 14:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.tibobeijen.nl/?p=385#comment-1285</guid>
		<description>Imho reflection is the way to go. It&#039;s what Hibernate in Java does and what Doctrine 2 will do in php; the trick is in making the DataMapper implementation so generic (with an Orm) that is does not know the internal details of the domain object more than it should. This is tipically accomplished with annotation on the private properties that have to be persisted.
The &#039;id&#039; example is emblematic: the reflection solution is simpler and does not couple the domain object to a service class or interface, and it keeps it &#039;newable&#039; allowing a standard new operator to be called anywhere, even in testing: you do not want to instance a Service_Order just to build and test a Domain_Order class.</description>
		<content:encoded><![CDATA[<p>Imho reflection is the way to go. It&#8217;s what Hibernate in Java does and what Doctrine 2 will do in php; the trick is in making the DataMapper implementation so generic (with an Orm) that is does not know the internal details of the domain object more than it should. This is tipically accomplished with annotation on the private properties that have to be persisted.<br />
The &#8216;id&#8217; example is emblematic: the reflection solution is simpler and does not couple the domain object to a service class or interface, and it keeps it &#8216;newable&#8217; allowing a standard new operator to be called anywhere, even in testing: you do not want to instance a Service_Order just to build and test a Domain_Order class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tibo Beijen</title>
		<link>http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/comment-page-1/#comment-1244</link>
		<dc:creator>Tibo Beijen</dc:creator>
		<pubDate>Fri, 10 Jul 2009 07:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.tibobeijen.nl/?p=385#comment-1244</guid>
		<description>Thanks for the pointer, I&#039;ll check it out. And an interesting subject it is indeed. 
I focused mainly on the creation of the Domain objects. It looks like the concepts you describe as DAO and Repositories (interesting) in my example are combined into the specific Service implementation handed out by the DAO registry.</description>
		<content:encoded><![CDATA[<p>Thanks for the pointer, I&#8217;ll check it out. And an interesting subject it is indeed.<br />
I focused mainly on the creation of the Domain objects. It looks like the concepts you describe as DAO and Repositories (interesting) in my example are combined into the specific Service implementation handed out by the DAO registry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jani Hartikainen</title>
		<link>http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/comment-page-1/#comment-1242</link>
		<dc:creator>Jani Hartikainen</dc:creator>
		<pubDate>Fri, 10 Jul 2009 06:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.tibobeijen.nl/?p=385#comment-1242</guid>
		<description>Dealing with domain objects and persistence is an interesting problem. I was working on a similar issue in a project, and we used an architechture a bit similar to yours.

Ours was more like the one described in Eric Evans&#039; book Domain-Driven Design - We had DAOs, which fetched raw data etc., Repositories, which were similar to your services as they used the DAOs to get data and created domain objects out of it, and finally the domain objects themselves.

The book is quite good, I recommend checking it out.</description>
		<content:encoded><![CDATA[<p>Dealing with domain objects and persistence is an interesting problem. I was working on a similar issue in a project, and we used an architechture a bit similar to yours.</p>
<p>Ours was more like the one described in Eric Evans&#8217; book Domain-Driven Design &#8211; We had DAOs, which fetched raw data etc., Repositories, which were similar to your services as they used the DAOs to get data and created domain objects out of it, and finally the domain objects themselves.</p>
<p>The book is quite good, I recommend checking it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tibo Beijen&#8217;s Blog: Controlled initialization of domain objects &#124; Webs Developer</title>
		<link>http://www.tibobeijen.nl/blog/2009/07/09/controlled-initialization-of-domain-objects/comment-page-1/#comment-1234</link>
		<dc:creator>Tibo Beijen&#8217;s Blog: Controlled initialization of domain objects &#124; Webs Developer</dc:creator>
		<pubDate>Thu, 09 Jul 2009 18:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.tibobeijen.nl/?p=385#comment-1234</guid>
		<description>[...] Beijen takes a look at domain objects in this new post to his blog and how they have them working in a project he&#8217;s been developing.   In a recent [...]</description>
		<content:encoded><![CDATA[<p>[...] Beijen takes a look at domain objects in this new post to his blog and how they have them working in a project he&#8217;s been developing.   In a recent [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

