<?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: CQRS &#8211; The Domain Events</title>
	<atom:link href="http://elegantcode.com/2009/11/20/cqrs-the-domain-events/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/</link>
	<description></description>
	<lastBuildDate>Wed, 10 Mar 2010 19:57:20 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Elegant Code &#187; CQRS &#8211; Trying to make it re-usable</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50749</link>
		<dc:creator>Elegant Code &#187; CQRS &#8211; Trying to make it re-usable</dc:creator>
		<pubDate>Sat, 28 Nov 2009 23:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50749</guid>
		<description>[...] I haven’t done anything with the event store yet, I don’t think the functionality will change much from the code in the example project. One thing that will remain the same is the dependency on interfaces, and not on specific implementations. This is obviously because it is good design practices. And it will enable us to mix this new approach and the approach using the BaseAggregateRoot class together with the same event store. The BaseAggregateRoot is discussed in detail here. [...]</description>
		<content:encoded><![CDATA[<p>[...] I haven’t done anything with the event store yet, I don’t think the functionality will change much from the code in the example project. One thing that will remain the same is the dependency on interfaces, and not on specific implementations. This is obviously because it is good design practices. And it will enable us to mix this new approach and the approach using the BaseAggregateRoot class together with the same event store. The BaseAggregateRoot is discussed in detail here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50605</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50605</guid>
		<description>&lt;a href=&quot;#comment-50604&quot; rel=&quot;nofollow&quot;&gt;@Mike&lt;/a&gt; 
Perhaps you want to send me the code? I am currently working on something as well and some more input would be cool.</description>
		<content:encoded><![CDATA[<p><a href="#comment-50604" rel="nofollow">@Mike</a><br />
Perhaps you want to send me the code? I am currently working on something as well and some more input would be cool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50604</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50604</guid>
		<description>I finally got this working (I think). I had decomposed the event provider stuff out of the aggregate root base and the RegisterEvent call accepts a predicate for acceptance during dispatch.</description>
		<content:encoded><![CDATA[<p>I finally got this working (I think). I had decomposed the event provider stuff out of the aggregate root base and the RegisterEvent call accepts a predicate for acceptance during dispatch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50597</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Mon, 23 Nov 2009 14:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50597</guid>
		<description>&lt;a href=&quot;#comment-50582&quot; rel=&quot;nofollow&quot;&gt;@Szymon Pobiega&lt;/a&gt; 
In my personal git repository I have already moved the different base classes to the event store so that the domain is only &#039;using&#039; them. And it would probably be doable to create some sort of proxy that does some stuff for you automatically without having the inherit from the base class.</description>
		<content:encoded><![CDATA[<p><a href="#comment-50582" rel="nofollow">@Szymon Pobiega</a><br />
In my personal git repository I have already moved the different base classes to the event store so that the domain is only &#8216;using&#8217; them. And it would probably be doable to create some sort of proxy that does some stuff for you automatically without having the inherit from the base class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50596</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Mon, 23 Nov 2009 14:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50596</guid>
		<description>&lt;a href=&quot;#comment-50578&quot; rel=&quot;nofollow&quot;&gt;@Mike&lt;/a&gt; 
Well each Entity in the collection is going to need an unique Id anyway (unique in the collection) so the event needs the Id of the Aggregate Root and it needs the Id of the Entity. So I am looking for a solution where both will be assigned automatically leaning towards what Jonathan suggested. But in the end you need to match Entities by their Id.</description>
		<content:encoded><![CDATA[<p><a href="#comment-50578" rel="nofollow">@Mike</a><br />
Well each Entity in the collection is going to need an unique Id anyway (unique in the collection) so the event needs the Id of the Aggregate Root and it needs the Id of the Entity. So I am looking for a solution where both will be assigned automatically leaning towards what Jonathan suggested. But in the end you need to match Entities by their Id.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #482</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50588</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #482</dc:creator>
		<pubDate>Mon, 23 Nov 2009 11:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50588</guid>
		<description>[...] CQRS - The Domain Events - Mark Nijhof discusses the role of Domain Events in Command Query Responsibility Segregation code, showing their role in managing the state changes of the aggregate roots [...]</description>
		<content:encoded><![CDATA[<p>[...] CQRS &#8211; The Domain Events &#8211; Mark Nijhof discusses the role of Domain Events in Command Query Responsibility Segregation code, showing their role in managing the state changes of the aggregate roots [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szymon Pobiega</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50582</link>
		<dc:creator>Szymon Pobiega</dc:creator>
		<pubDate>Mon, 23 Nov 2009 07:28:53 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50582</guid>
		<description>Great job! Another very nice post. You convinced me to try this approach in practice. One thing I am concerned with is whether this approach is not overemphasizing the infrastructure. I would really like to put all those base classes in a separate library and just use them.

Obviously, it would be _ideal_ to make this model usable witch POCO approach. I really don&#039;t know if it is possible -- it is just an idea.</description>
		<content:encoded><![CDATA[<p>Great job! Another very nice post. You convinced me to try this approach in practice. One thing I am concerned with is whether this approach is not overemphasizing the infrastructure. I would really like to put all those base classes in a separate library and just use them.</p>
<p>Obviously, it would be _ideal_ to make this model usable witch POCO approach. I really don&#8217;t know if it is possible &#8212; it is just an idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50578</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 23 Nov 2009 03:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50578</guid>
		<description>I have been messing with this and can&#039;t find a very clean way to dispatch to the correct instance given a collection of same-typed entities within an AR. The only solution I can figure is a predicate, maybe comparing an EntityId against the event, that an Entity base class can supply the MessageDispatcher to either accept the event or not. Otherwise, all entities of that type handle the event even when they shouldn&#039;t.</description>
		<content:encoded><![CDATA[<p>I have been messing with this and can&#8217;t find a very clean way to dispatch to the correct instance given a collection of same-typed entities within an AR. The only solution I can figure is a predicate, maybe comparing an EntityId against the event, that an Entity base class can supply the MessageDispatcher to either accept the event or not. Otherwise, all entities of that type handle the event even when they shouldn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50539</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Sat, 21 Nov 2009 14:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50539</guid>
		<description>&lt;a href=&quot;#comment-50529&quot; rel=&quot;nofollow&quot;&gt;@Jonathan Oliver&lt;/a&gt; 
This is an interesting approach, I&#039;ll take a look on how I would like to implement something like this.</description>
		<content:encoded><![CDATA[<p><a href="#comment-50529" rel="nofollow">@Jonathan Oliver</a><br />
This is an interesting approach, I&#8217;ll take a look on how I would like to implement something like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Oliver</title>
		<link>http://elegantcode.com/2009/11/20/cqrs-the-domain-events/comment-page-1/#comment-50529</link>
		<dc:creator>Jonathan Oliver</dc:creator>
		<pubDate>Sat, 21 Nov 2009 04:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/11/20/cqrs-the-domain-events/#comment-50529</guid>
		<description>One thing that we&#039;ve done is to promote the idea of routing the events inside the aggregate root to a first-class citizen by making it an object.  By doing this, we can actually simply a lot of code.  Specifically, this &quot;dispatcher&quot; as we call it, can be provided as a constructor parameter to the child entity object.  By doing this we gain several advantages:

1. The child can add its own private routes for particular messages directly to the aggregate root dispatcher.
2. The aggregate root&#039;s &quot;Apply&quot; method will handle incrementing the aggregate version for any event (both aggregate and child entity events)--we don&#039;t have to pass around method delegates to increment the aggregate version.
3. The aggregate root&#039;s uncommited event collection will store all of the events from all child entities (this is slightly different from what Greg does).
4. The events in the aggregate root will then contain all child events in the exact order in which they were created--no OrderBy() method required when persisting, no need to iterate through all child objects, and no need to have each child entity track the domain events because the aggregate root is already doing it all.</description>
		<content:encoded><![CDATA[<p>One thing that we&#8217;ve done is to promote the idea of routing the events inside the aggregate root to a first-class citizen by making it an object.  By doing this, we can actually simply a lot of code.  Specifically, this &#8220;dispatcher&#8221; as we call it, can be provided as a constructor parameter to the child entity object.  By doing this we gain several advantages:</p>
<p>1. The child can add its own private routes for particular messages directly to the aggregate root dispatcher.<br />
2. The aggregate root&#8217;s &#8220;Apply&#8221; method will handle incrementing the aggregate version for any event (both aggregate and child entity events)&#8211;we don&#8217;t have to pass around method delegates to increment the aggregate version.<br />
3. The aggregate root&#8217;s uncommited event collection will store all of the events from all child entities (this is slightly different from what Greg does).<br />
4. The events in the aggregate root will then contain all child events in the exact order in which they were created&#8211;no OrderBy() method required when persisting, no need to iterate through all child objects, and no need to have each child entity track the domain events because the aggregate root is already doing it all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
