<?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: Comments to Gavin King about DDD and Repositories</title>
	<atom:link href="http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/feed/" rel="self" type="application/rss+xml" />
	<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/</link>
	<description>Deleting code. Better than writing good code.</description>
	<lastBuildDate>Wed, 28 Mar 2012 05:14:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Joshua Ramirez</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-594</link>
		<dc:creator><![CDATA[Joshua Ramirez]]></dc:creator>
		<pubDate>Mon, 06 Jun 2011 18:20:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-594</guid>
		<description><![CDATA[Fabio, I think you may be watering down what the repository is for in DDD. The purpose of a Repository is to provide the illusion of an in-memory collection of aggregate roots. The subtleties abound, and without a proper study of DDD, they are summarily dismissed. For example, in DDD, a Factory is responsible for the creation of a new aggregate root (multiple or a single domain object) inasmuch that its invariants are enforced before being returned to the client. Continually, the Repository enforces the same invariants, but within the realm of retrieving and hydrating an aggregate root from a data store. It is more than a DAO, and I think that is an important abstraction which cuts out much of the clutter responsible for rendering many domain layers useless.]]></description>
		<content:encoded><![CDATA[<p>Fabio, I think you may be watering down what the repository is for in DDD. The purpose of a Repository is to provide the illusion of an in-memory collection of aggregate roots. The subtleties abound, and without a proper study of DDD, they are summarily dismissed. For example, in DDD, a Factory is responsible for the creation of a new aggregate root (multiple or a single domain object) inasmuch that its invariants are enforced before being returned to the client. Continually, the Repository enforces the same invariants, but within the realm of retrieving and hydrating an aggregate root from a data store. It is more than a DAO, and I think that is an important abstraction which cuts out much of the clutter responsible for rendering many domain layers useless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro Oliveira</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-373</link>
		<dc:creator><![CDATA[Pedro Oliveira]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 23:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-373</guid>
		<description><![CDATA[@Fabio what about the responsability of each component? 
I still thinking about the responsability of each Repository and i dont think that a entity has the responsability to separate data in your implementation, even if the agregate data are called by a method like &#039;.finbByEspecificCondition(Entity entity)&#039;, i think separate the repository can bring you more flexibility than put all on the same object.]]></description>
		<content:encoded><![CDATA[<p>@Fabio what about the responsability of each component?<br />
I still thinking about the responsability of each Repository and i dont think that a entity has the responsability to separate data in your implementation, even if the agregate data are called by a method like &#8216;.finbByEspecificCondition(Entity entity)&#8217;, i think separate the repository can bring you more flexibility than put all on the same object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dúvida de Design Agreggates e Repository &#171; Pedro Oliveira Blog</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-372</link>
		<dc:creator><![CDATA[Dúvida de Design Agreggates e Repository &#171; Pedro Oliveira Blog]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 12:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-372</guid>
		<description><![CDATA[[...] nos pontos positivos e negativos de cada uma das opções. Component Aggregates About Repositories Comments to Gavin King about DDD and Repositories Repository Pattern vs. Transparent Persistence Repository: seu modelo mais Orientado a [...]]]></description>
		<content:encoded><![CDATA[<p>[...] nos pontos positivos e negativos de cada uma das opções. Component Aggregates About Repositories Comments to Gavin King about DDD and Repositories Repository Pattern vs. Transparent Persistence Repository: seu modelo mais Orientado a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabio Kung</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-117</link>
		<dc:creator><![CDATA[Fabio Kung]]></dc:creator>
		<pubDate>Mon, 27 Oct 2008 15:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-117</guid>
		<description><![CDATA[@lonelybug

Interesting use!]]></description>
		<content:encoded><![CDATA[<p>@lonelybug</p>
<p>Interesting use!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lonelybug</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-116</link>
		<dc:creator><![CDATA[lonelybug]]></dc:creator>
		<pubDate>Mon, 27 Oct 2008 05:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-116</guid>
		<description><![CDATA[i see what&#039;s you mean. here is one important advantage as you apply Repository rather than DAO. one more layer -- Repository, between Dao and Aggregate Entitry, which bring some flexiblity, for example, the cache or the concentration access point.

for example if apply the Dao, then the client (caller) need to understand and learn some complicated detail or Dao objects.

the codes should looks like:

Client c=new Client(clientDao).

if you do others, you also have to know the related Daos for those entities.

but for Repository.

the repository just apply for root entity for an aggregate.

so there are more less repository need to learn or even you can apply repository factory pattern.

codes looks like:

Client c=new Client(RepositoryFactory.getInstance())

within the Client:

Client(factory){
  repository=factory.getRepository(Client.class);
}

hope can help you a little.]]></description>
		<content:encoded><![CDATA[<p>i see what&#8217;s you mean. here is one important advantage as you apply Repository rather than DAO. one more layer &#8212; Repository, between Dao and Aggregate Entitry, which bring some flexiblity, for example, the cache or the concentration access point.</p>
<p>for example if apply the Dao, then the client (caller) need to understand and learn some complicated detail or Dao objects.</p>
<p>the codes should looks like:</p>
<p>Client c=new Client(clientDao).</p>
<p>if you do others, you also have to know the related Daos for those entities.</p>
<p>but for Repository.</p>
<p>the repository just apply for root entity for an aggregate.</p>
<p>so there are more less repository need to learn or even you can apply repository factory pattern.</p>
<p>codes looks like:</p>
<p>Client c=new Client(RepositoryFactory.getInstance())</p>
<p>within the Client:</p>
<p>Client(factory){<br />
  repository=factory.getRepository(Client.class);<br />
}</p>
<p>hope can help you a little.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Jack</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-30</link>
		<dc:creator><![CDATA[Colin Jack]]></dc:creator>
		<pubDate>Sat, 24 Nov 2007 16:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-30</guid>
		<description><![CDATA[Is this just a variety on the Transaciton Script approach?]]></description>
		<content:encoded><![CDATA[<p>Is this just a variety on the Transaciton Script approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephan Schmidt</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-29</link>
		<dc:creator><![CDATA[Stephan Schmidt]]></dc:creator>
		<pubDate>Sat, 24 Nov 2007 13:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-29</guid>
		<description><![CDATA[@Dietmar: Wonderful! I&#039;ve also implemented a large application with the business logic in commands and the data in objects. This was very useful and it was very easy to recombine and reuse commands for new business cases. I&#039;ll certainly take a look at tiny marbles.]]></description>
		<content:encoded><![CDATA[<p>@Dietmar: Wonderful! I&#8217;ve also implemented a large application with the business logic in commands and the data in objects. This was very useful and it was very easy to recombine and reuse commands for new business cases. I&#8217;ll certainly take a look at tiny marbles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietmar Temps</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-28</link>
		<dc:creator><![CDATA[Dietmar Temps]]></dc:creator>
		<pubDate>Sat, 24 Nov 2007 13:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-28</guid>
		<description><![CDATA[@Stephan: It is interesting to read a comment like this. I&#039;m a member of an Open Source project, called Tiny Marbles (http://www.tinymarbles.org). We are following a similar approach: we store objects in a repository. There are CRUD methods for the objects, that&#039;s almost all. The complete business logic we encapsulate using the Command pattern. I wouldn&#039;t say, that this approach would fit in every software project, but in a web application environment for business applications it is just wonderful. And it fits perfectly well to a RESTful architecture.

The discussion here shows one thing very clearly: who says, the decision that &#039;getOrders&#039; is connected to &#039;Client&#039; is a good decision? Sometimes when starting the project the requirements are not known completely. At least while developing web application where requirements can change very often, it seems to me a better approach to maintain a stable domain model (which we do in our case in the Tiny Marbles repository), and delegate the business logic to &#039;services&#039; (in our case using the Command pattern) which changes the state of the repository, or simply gives filtered information about the current state of the system. For the example you mentioned in your post we would prefer: getRepo.OrdersSinceDate(User, date). And we even go one step further: we are using the object &#039;User&#039; with the role &#039;customer&#039; or &#039;client&#039;.

@Fabio: I would love to discuss our philosophy with you, although I know, you don&#039;t agree and this place might not the right board for that. But hopefully some day there will be an opportunity :)]]></description>
		<content:encoded><![CDATA[<p>@Stephan: It is interesting to read a comment like this. I&#8217;m a member of an Open Source project, called Tiny Marbles (<a href="http://www.tinymarbles.org" rel="nofollow">http://www.tinymarbles.org</a>). We are following a similar approach: we store objects in a repository. There are CRUD methods for the objects, that&#8217;s almost all. The complete business logic we encapsulate using the Command pattern. I wouldn&#8217;t say, that this approach would fit in every software project, but in a web application environment for business applications it is just wonderful. And it fits perfectly well to a RESTful architecture.</p>
<p>The discussion here shows one thing very clearly: who says, the decision that &#8216;getOrders&#8217; is connected to &#8216;Client&#8217; is a good decision? Sometimes when starting the project the requirements are not known completely. At least while developing web application where requirements can change very often, it seems to me a better approach to maintain a stable domain model (which we do in our case in the Tiny Marbles repository), and delegate the business logic to &#8216;services&#8217; (in our case using the Command pattern) which changes the state of the repository, or simply gives filtered information about the current state of the system. For the example you mentioned in your post we would prefer: getRepo.OrdersSinceDate(User, date). And we even go one step further: we are using the object &#8216;User&#8217; with the role &#8216;customer&#8217; or &#8216;client&#8217;.</p>
<p>@Fabio: I would love to discuss our philosophy with you, although I know, you don&#8217;t agree and this place might not the right board for that. But hopefully some day there will be an opportunity <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephan Schmidt</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-27</link>
		<dc:creator><![CDATA[Stephan Schmidt]]></dc:creator>
		<pubDate>Wed, 21 Nov 2007 05:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-27</guid>
		<description><![CDATA[@Fabio: No I&#039;m not. After 20 years of developing applications with OO I think it&#039;s not the best way. From my experience FOOP is easier to refactor, easier to understand, easier to reuse and easier to maintain in the long run. Perhaps I have to blog an example to make people understand.

Peace
-stephan]]></description>
		<content:encoded><![CDATA[<p>@Fabio: No I&#8217;m not. After 20 years of developing applications with OO I think it&#8217;s not the best way. From my experience FOOP is easier to refactor, easier to understand, easier to reuse and easier to maintain in the long run. Perhaps I have to blog an example to make people understand.</p>
<p>Peace<br />
-stephan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabio Kung</title>
		<link>http://fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-26</link>
		<dc:creator><![CDATA[Fabio Kung]]></dc:creator>
		<pubDate>Tue, 20 Nov 2007 23:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.fabiokung.com/2007/11/12/comments-to-gavin-king-about-ddd-and-repositories/#comment-26</guid>
		<description><![CDATA[@Stephan

You are just kidding, right?]]></description>
		<content:encoded><![CDATA[<p>@Stephan</p>
<p>You are just kidding, right?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

