<?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: Domain Events &#8211; Salvation</title>
	<atom:link href="http://www.udidahan.com/2009/06/14/domain-events-salvation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Sat, 11 Feb 2012 15:16:10 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-4/#comment-38213</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Fri, 04 Nov 2011 06:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-38213</guid>
		<description>Robert,

You can use NServiceBus to create an application server - see the async pages sample for an example of how this would look.</description>
		<content:encoded><![CDATA[<p>Robert,</p>
<p>You can use NServiceBus to create an application server &#8211; see the async pages sample for an example of how this would look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Stackhouse (@rstackhouse)</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-4/#comment-38202</link>
		<dc:creator>Robert Stackhouse (@rstackhouse)</dc:creator>
		<pubDate>Mon, 31 Oct 2011 15:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-38202</guid>
		<description>Udi, I really like Domain Events concept. After reading your post and several others (http://elegantcode.com/2010/01/06/event-driven-architecture-publishing-events-using-an-ioc-container/ and http://trycatchfail.com/blog/post/Heavy-controller-actions-The-Message-Bus-Pattern-to-the-rescue!.aspx for example), it feels like I basically have two options:

Create an application server as you suggest (not really sure what that would look like; NT Service perhaps?) to get around the ThreadStatic problem in ASP.NET

OR

Move the responsibility of publishing events outside of the domain (for example: in an MVC controller, as is done in the two articles I linked to above).

Are there any other approaches which you are aware that I might be missing?

If there aren&#039;t any other options, are you aware of any good resources on creating an application server?

I&#039;ve read quite a few blogs on CQRS recently, but the technique seems ephemeral at best at this point.</description>
		<content:encoded><![CDATA[<p>Udi, I really like Domain Events concept. After reading your post and several others (<a href="http://elegantcode.com/2010/01/06/event-driven-architecture-publishing-events-using-an-ioc-container/" rel="nofollow">http://elegantcode.com/2010/01/06/event-driven-architecture-publishing-events-using-an-ioc-container/</a> and <a href="http://trycatchfail.com/blog/post/Heavy-controller-actions-The-Message-Bus-Pattern-to-the-rescue" rel="nofollow">http://trycatchfail.com/blog/post/Heavy-controller-actions-The-Message-Bus-Pattern-to-the-rescue</a>!.aspx for example), it feels like I basically have two options:</p>
<p>Create an application server as you suggest (not really sure what that would look like; NT Service perhaps?) to get around the ThreadStatic problem in ASP.NET</p>
<p>OR</p>
<p>Move the responsibility of publishing events outside of the domain (for example: in an MVC controller, as is done in the two articles I linked to above).</p>
<p>Are there any other approaches which you are aware that I might be missing?</p>
<p>If there aren&#8217;t any other options, are you aware of any good resources on creating an application server?</p>
<p>I&#8217;ve read quite a few blogs on CQRS recently, but the technique seems ephemeral at best at this point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-4/#comment-37788</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 16 May 2011 20:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37788</guid>
		<description>Jason,

Keeping the metrics in a different persistent object model is a good idea. Sending to another endpoint is something that you would do using something like NServiceBus - ergo a multi-process solution. 

You could shortcut this somewhat by having the other endpoint be hosted in a separate appdomain in the same process - would that help?</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>Keeping the metrics in a different persistent object model is a good idea. Sending to another endpoint is something that you would do using something like NServiceBus &#8211; ergo a multi-process solution. </p>
<p>You could shortcut this somewhat by having the other endpoint be hosted in a separate appdomain in the same process &#8211; would that help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-4/#comment-37773</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 13 May 2011 22:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37773</guid>
		<description>Thanks Udi.  I don&#039;t suppose they need to be in the same transaction, but ideally they would be.  I guess not hearing you arguing against the entity relationships is also helpful too (metrics didn&#039;t seem like they belonged on the forum/thread/post objects). Can you suggest what sending to another endpoint might look like when I&#039;m not using a message bus?  This is just a fairly straightforward single instance ASP.NET MVC app.</description>
		<content:encoded><![CDATA[<p>Thanks Udi.  I don&#8217;t suppose they need to be in the same transaction, but ideally they would be.  I guess not hearing you arguing against the entity relationships is also helpful too (metrics didn&#8217;t seem like they belonged on the forum/thread/post objects). Can you suggest what sending to another endpoint might look like when I&#8217;m not using a message bus?  This is just a fairly straightforward single instance ASP.NET MVC app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-4/#comment-37772</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Fri, 13 May 2011 17:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37772</guid>
		<description>Jason,

Those metrics don&#039;t need to be handled in the same transaction as the new post or topic, right? In which case, I&#039;d recommend sending a message from your domain event handler to another endpoint, and it will be the one doing those calculations.</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>Those metrics don&#8217;t need to be handled in the same transaction as the new post or topic, right? In which case, I&#8217;d recommend sending a message from your domain event handler to another endpoint, and it will be the one doing those calculations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37769</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 12 May 2011 21:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37769</guid>
		<description>I&#039;m trying to implement a forums system where Forum has a list of Topics which have a list of Posts.  In my current model, I have top-down one-way  relationships (i.e. Posts don&#039;t know which Topic they&#039;re in &amp; Topics don&#039;t know which Forum they&#039;re in).  

When a new post is added to a topic or a new topic is added to a forum, I&#039;d like to cache some summary information (last post title for a topic/forum, last poster for a topic, total topics, total replies per thread and forum, etc.).  I initially thought about caching these in the parent object, but I&#039;m leaning more towards having new entities for ForumMetrics and TopicMetrics that get updated when a DomainEvent is fired from the containing object.

However, reading through the comments above, it seems you&#039;re suggesting staying away from calling into repositories from DomainEvent handlers.  Do you have a suggestion for how I might persist this summary information otherwise?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to implement a forums system where Forum has a list of Topics which have a list of Posts.  In my current model, I have top-down one-way  relationships (i.e. Posts don&#8217;t know which Topic they&#8217;re in &amp; Topics don&#8217;t know which Forum they&#8217;re in).  </p>
<p>When a new post is added to a topic or a new topic is added to a forum, I&#8217;d like to cache some summary information (last post title for a topic/forum, last poster for a topic, total topics, total replies per thread and forum, etc.).  I initially thought about caching these in the parent object, but I&#8217;m leaning more towards having new entities for ForumMetrics and TopicMetrics that get updated when a DomainEvent is fired from the containing object.</p>
<p>However, reading through the comments above, it seems you&#8217;re suggesting staying away from calling into repositories from DomainEvent handlers.  Do you have a suggestion for how I might persist this summary information otherwise?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37601</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 05 Mar 2011 12:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37601</guid>
		<description>I was a bit worried about this while designing this behavior in a seperate BC. Everything made sense to be in a different BC until I came across this last part. It appears I&#039;m going to have to reevaluate what I&#039;ve done and bring the two together.</description>
		<content:encoded><![CDATA[<p>I was a bit worried about this while designing this behavior in a seperate BC. Everything made sense to be in a different BC until I came across this last part. It appears I&#8217;m going to have to reevaluate what I&#8217;ve done and bring the two together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37599</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 05 Mar 2011 11:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37599</guid>
		<description>Dan,

I&#039;d be quite suspicious about BCs that always need to be consistent with each other - this high temporal coupling indicates that there is a strong semantic coupling as well.</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>I&#8217;d be quite suspicious about BCs that always need to be consistent with each other &#8211; this high temporal coupling indicates that there is a strong semantic coupling as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37598</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 04 Mar 2011 22:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37598</guid>
		<description>Udi,

Thank you for taking the time to answer my question. After some thought I&#039;m having difficulty determing if the *need* to be consistent. I&#039;m using NHibernate as my persistence mechanism. I&#039;ve wrapped NHibernate&#039;s ISession in a custom UnitOfWork class.

My application service does the following:

using(IUnitOfWork uow = UnitOfWork.Create())
{
    IRepository repository = ....

    Driver driver = repository.GetById(driverIdToMerge);

    driver.Merge(driverId);
    
    uow.PersistAll();
}

My probem is that I can&#039;t have the domain events actually be raised until the session is flushed and all commands have been sent to the database because the 2nd BC involved expects those changes to be there.

What I&#039;ve done is this. I&#039;ve taken your DomainEvents class and added some functionality to essentially store all the events it has been sent from the domain objects. When PersistAll() is called above it starts a transaction, flushes the session and commits the changes.
Then within the same method it raises all of the events in the DomainEvents class by calling a static method named RaiseAll(). This currently works because the changes have been committed and the 2nd BC can act appropriately.

I don&#039;t like the way this is implemented. It doesn&#039;t hurt anything if the 2nd BC is executed, it just doesn&#039;t make any sense for it to. I&#039;d like the entire thing to run under one transaction if possible.

Now, finally for my question. The only way I see to have the seperate BC&#039;s be executed under the same transaction is if I pass the session into the handler. Is this OK to do? Something about this just doesn&#039;t seem right. Thanks again for your help.</description>
		<content:encoded><![CDATA[<p>Udi,</p>
<p>Thank you for taking the time to answer my question. After some thought I&#8217;m having difficulty determing if the *need* to be consistent. I&#8217;m using NHibernate as my persistence mechanism. I&#8217;ve wrapped NHibernate&#8217;s ISession in a custom UnitOfWork class.</p>
<p>My application service does the following:</p>
<p>using(IUnitOfWork uow = UnitOfWork.Create())<br />
{<br />
    IRepository repository = &#8230;.</p>
<p>    Driver driver = repository.GetById(driverIdToMerge);</p>
<p>    driver.Merge(driverId);</p>
<p>    uow.PersistAll();<br />
}</p>
<p>My probem is that I can&#8217;t have the domain events actually be raised until the session is flushed and all commands have been sent to the database because the 2nd BC involved expects those changes to be there.</p>
<p>What I&#8217;ve done is this. I&#8217;ve taken your DomainEvents class and added some functionality to essentially store all the events it has been sent from the domain objects. When PersistAll() is called above it starts a transaction, flushes the session and commits the changes.<br />
Then within the same method it raises all of the events in the DomainEvents class by calling a static method named RaiseAll(). This currently works because the changes have been committed and the 2nd BC can act appropriately.</p>
<p>I don&#8217;t like the way this is implemented. It doesn&#8217;t hurt anything if the 2nd BC is executed, it just doesn&#8217;t make any sense for it to. I&#8217;d like the entire thing to run under one transaction if possible.</p>
<p>Now, finally for my question. The only way I see to have the seperate BC&#8217;s be executed under the same transaction is if I pass the session into the handler. Is this OK to do? Something about this just doesn&#8217;t seem right. Thanks again for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37595</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Fri, 04 Mar 2011 07:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37595</guid>
		<description>Dan,

The question is whether you need both your BCs to be consistent with each other at *all* times - ergo in the same transaction. 

If the answer is yes, then you absolutely do want the event to be raised and handled in the same transaction - you&#039;d also be deploying both BCs together.

If the answer is no, then you should use some kind of message bus between the BCs. The handler for the domain event would publish a message using the bus, and that would be enlisted in the same transaction - thus is the first BC rolled back, the message wouldn&#039;t be sent. The second BC would be invoked by the bus when the message arrives at its queue where its handling would then be done in a separate transaction.</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>The question is whether you need both your BCs to be consistent with each other at *all* times &#8211; ergo in the same transaction. </p>
<p>If the answer is yes, then you absolutely do want the event to be raised and handled in the same transaction &#8211; you&#8217;d also be deploying both BCs together.</p>
<p>If the answer is no, then you should use some kind of message bus between the BCs. The handler for the domain event would publish a message using the bus, and that would be enlisted in the same transaction &#8211; thus is the first BC rolled back, the message wouldn&#8217;t be sent. The second BC would be invoked by the bus when the message arrives at its queue where its handling would then be done in a separate transaction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37591</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 24 Feb 2011 17:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37591</guid>
		<description>Udi,
  
In message number 120 above, Lars asks about how to access the data if the event is fired before the commit. I didn&#039;t understand your response. Maybe my situation is different so I&#039;ll explain.

I have 2 BCs. One context deals with the merging of employee information. I&#039;d like to fire a domain event specifying that the employee was merged. I&#039;d like the 2nd BC to react to this event. The issue is that the data won&#039;t be committed at that point, and this data that changed is vital to the 2nd BC to react.

Am I going down the wrong path by attempting to use domain events? Is there another solution you could suggest?</description>
		<content:encoded><![CDATA[<p>Udi,</p>
<p>In message number 120 above, Lars asks about how to access the data if the event is fired before the commit. I didn&#8217;t understand your response. Maybe my situation is different so I&#8217;ll explain.</p>
<p>I have 2 BCs. One context deals with the merging of employee information. I&#8217;d like to fire a domain event specifying that the employee was merged. I&#8217;d like the 2nd BC to react to this event. The issue is that the data won&#8217;t be committed at that point, and this data that changed is vital to the 2nd BC to react.</p>
<p>Am I going down the wrong path by attempting to use domain events? Is there another solution you could suggest?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37587</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Fri, 11 Feb 2011 07:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37587</guid>
		<description>Mark,

Yes, domain events are a useful way to keep to BCs in sync. The specific scenario you&#039;re raising (calling a web service) is one where you&#039;d probably be better off by introducing messaging between your BCs so that the non-deterministic latency of the web service call doesn&#039;t end up slowing down your system.</description>
		<content:encoded><![CDATA[<p>Mark,</p>
<p>Yes, domain events are a useful way to keep to BCs in sync. The specific scenario you&#8217;re raising (calling a web service) is one where you&#8217;d probably be better off by introducing messaging between your BCs so that the non-deterministic latency of the web service call doesn&#8217;t end up slowing down your system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lee</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37585</link>
		<dc:creator>Mark Lee</dc:creator>
		<pubDate>Tue, 08 Feb 2011 21:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37585</guid>
		<description>I&#039;m trying to get my head around DDD (and so far loving what it has to offer), and I&#039;m wondering if Domain Events are an appropriate method to communicate between Bounded Contexts. 

I am developing a web-ordering system, where submitted orders are sent to a remote web service (controlled by another part of the business). I&#039;m thinking of two primary bounded contexts: Local and Remote (actual names are more appropriate to the business context, but just keeping things simple here). When an order is saved in the Local context, I&#039;ve been thinking about using Domain events to trigger the order being submitted in the Remote context to the web service.

Does a domain event seem like the right approach in this case? And, more generally, does communicating between bounded contexts using domain events seem reasonable?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to get my head around DDD (and so far loving what it has to offer), and I&#8217;m wondering if Domain Events are an appropriate method to communicate between Bounded Contexts. </p>
<p>I am developing a web-ordering system, where submitted orders are sent to a remote web service (controlled by another part of the business). I&#8217;m thinking of two primary bounded contexts: Local and Remote (actual names are more appropriate to the business context, but just keeping things simple here). When an order is saved in the Local context, I&#8217;ve been thinking about using Domain events to trigger the order being submitted in the Remote context to the web service.</p>
<p>Does a domain event seem like the right approach in this case? And, more generally, does communicating between bounded contexts using domain events seem reasonable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37487</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Wed, 20 Oct 2010 20:50:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37487</guid>
		<description>Jason,

I&#039;m not very positive about the benefits of event sourcing so I&#039;m not sure I&#039;m in a position to answer your questions. One reason is that I don&#039;t think that the majority of raw data in the system (like customer first name, last name, phone numbers, etc) actually need to be in the domain model when doing CQRS.</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>I&#8217;m not very positive about the benefits of event sourcing so I&#8217;m not sure I&#8217;m in a position to answer your questions. One reason is that I don&#8217;t think that the majority of raw data in the system (like customer first name, last name, phone numbers, etc) actually need to be in the domain model when doing CQRS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37485</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 17 Oct 2010 14:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37485</guid>
		<description>A separate question.

On comand/event separation.  Is it not equally valid to say

A customer requested a change to their address as it is to say A customer requests a change to their address.

My reasoning is by the time it gets to your domain model, it is in the past.</description>
		<content:encoded><![CDATA[<p>A separate question.</p>
<p>On comand/event separation.  Is it not equally valid to say</p>
<p>A customer requested a change to their address as it is to say A customer requests a change to their address.</p>
<p>My reasoning is by the time it gets to your domain model, it is in the past.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37484</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 17 Oct 2010 14:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37484</guid>
		<description>I have scanned the 139 postings in response to this article, and have not seen this questions asked.  Please forgive me if I missed it.

I am seriously looking at CQRS in combination with all the other DDD goodies.  In particular Event sourcing.

My question is, given the separation between commands (things you want to happen) and events, what actually happened.  If you were building a framework to give the ability to reverse/replay/compensate.  In an event, would you record the full state of the object, before/after, both or only what changed with before/after or simply what changed after.

I am specifically lookin at this from the reverse/replay/compensate and audit trail point of view.

Compensate is something I have added.  For situations such as you have reverved a hotel room via a Gateway to another system and your transaction fails, thus you need to compensate for the failure with a system that is not in your transaction boundary.

I have already implemented recording commands, and am wondering if you would also record events, and if so, exactly what you would record.</description>
		<content:encoded><![CDATA[<p>I have scanned the 139 postings in response to this article, and have not seen this questions asked.  Please forgive me if I missed it.</p>
<p>I am seriously looking at CQRS in combination with all the other DDD goodies.  In particular Event sourcing.</p>
<p>My question is, given the separation between commands (things you want to happen) and events, what actually happened.  If you were building a framework to give the ability to reverse/replay/compensate.  In an event, would you record the full state of the object, before/after, both or only what changed with before/after or simply what changed after.</p>
<p>I am specifically lookin at this from the reverse/replay/compensate and audit trail point of view.</p>
<p>Compensate is something I have added.  For situations such as you have reverved a hotel room via a Gateway to another system and your transaction fails, thus you need to compensate for the failure with a system that is not in your transaction boundary.</p>
<p>I have already implemented recording commands, and am wondering if you would also record events, and if so, exactly what you would record.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37456</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 19 Sep 2010 14:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37456</guid>
		<description>Nuno,

Domain events get handled by service layer objects in the same process which usually send out other messages - as such, we want those messages to be sent (or not) in the same transactional context.</description>
		<content:encoded><![CDATA[<p>Nuno,</p>
<p>Domain events get handled by service layer objects in the same process which usually send out other messages &#8211; as such, we want those messages to be sent (or not) in the same transactional context.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Lopes</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37454</link>
		<dc:creator>Nuno Lopes</dc:creator>
		<pubDate>Thu, 16 Sep 2010 15:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37454</guid>
		<description>This might be a bit of a late question. But shouldn&#039;t domain events be handled after the transaction ends?

Is there any specific reason for handle domain events within the same transaction scoping DoSomething?

Nuno</description>
		<content:encoded><![CDATA[<p>This might be a bit of a late question. But shouldn&#8217;t domain events be handled after the transaction ends?</p>
<p>Is there any specific reason for handle domain events within the same transaction scoping DoSomething?</p>
<p>Nuno</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37431</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Wed, 08 Sep 2010 12:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37431</guid>
		<description>Kenshin,

Don&#039;t take each of these blog posts as a full architectural picture - these are designed to nudge people in a certain direction. There are so many ways that people abuse domain models that the goal is to get them to see a different perspective.</description>
		<content:encoded><![CDATA[<p>Kenshin,</p>
<p>Don&#8217;t take each of these blog posts as a full architectural picture &#8211; these are designed to nudge people in a certain direction. There are so many ways that people abuse domain models that the goal is to get them to see a different perspective.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenshin</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37427</link>
		<dc:creator>kenshin</dc:creator>
		<pubDate>Mon, 06 Sep 2010 06:32:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37427</guid>
		<description>Udi,
Which blog post you&#039;re referring to, is it &quot;Don’t Create Aggregate Roots&quot; ? Are you saying that if we&#039;re not dealing with long-running processes, we should resort to only an event manager ? is that necessarily ligther than using a message bus.

Thank you
kenshin</description>
		<content:encoded><![CDATA[<p>Udi,<br />
Which blog post you&#8217;re referring to, is it &#8220;Don’t Create Aggregate Roots&#8221; ? Are you saying that if we&#8217;re not dealing with long-running processes, we should resort to only an event manager ? is that necessarily ligther than using a message bus.</p>
<p>Thank you<br />
kenshin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37425</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 06 Sep 2010 05:42:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37425</guid>
		<description>Kenshin,

If you&#039;ve noticed in my later blog posts, I&#039;ve mentioned how many domain models may ultimately end up as long-running processes (aka sagas) in which case the events raised are indeed published using a message/service bus.</description>
		<content:encoded><![CDATA[<p>Kenshin,</p>
<p>If you&#8217;ve noticed in my later blog posts, I&#8217;ve mentioned how many domain models may ultimately end up as long-running processes (aka sagas) in which case the events raised are indeed published using a message/service bus.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenshin</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37421</link>
		<dc:creator>kenshin</dc:creator>
		<pubDate>Fri, 03 Sep 2010 04:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37421</guid>
		<description>Sorry for the double entry ... I&#039;m reposting this due to typos in the previous one 

I don’t quite understand why should we use the code you presented in your article unless we want to build an EventManager from scratch. Seems to me that this is equivalent to using a message bus from within the domain object every time there is a need to raise an event, something similar to 

jmsService.send(destination, message)

jmsService would be equivalent to DomainEvents

Am I missing something ?

Thank you</description>
		<content:encoded><![CDATA[<p>Sorry for the double entry &#8230; I&#8217;m reposting this due to typos in the previous one </p>
<p>I don’t quite understand why should we use the code you presented in your article unless we want to build an EventManager from scratch. Seems to me that this is equivalent to using a message bus from within the domain object every time there is a need to raise an event, something similar to </p>
<p>jmsService.send(destination, message)</p>
<p>jmsService would be equivalent to DomainEvents</p>
<p>Am I missing something ?</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37395</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Tue, 31 Aug 2010 08:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37395</guid>
		<description>Maninder,

Actions from the UI are modeled as intention-revealing commands - not events. These commands indicate what is desired, but the system may ultimately reject. Events represent something that already happened.

You might want to read my posts on CQRS for information about this:

http://www.udidahan.com/2009/12/09/clarified-cqrs</description>
		<content:encoded><![CDATA[<p>Maninder,</p>
<p>Actions from the UI are modeled as intention-revealing commands &#8211; not events. These commands indicate what is desired, but the system may ultimately reject. Events represent something that already happened.</p>
<p>You might want to read my posts on CQRS for information about this:</p>
<p><a href="http://www.udidahan.com/2009/12/09/clarified-cqrs" rel="nofollow">http://www.udidahan.com/2009/12/09/clarified-cqrs</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maninder</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37393</link>
		<dc:creator>Maninder</dc:creator>
		<pubDate>Mon, 30 Aug 2010 18:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37393</guid>
		<description>Udi, i can see the value of representing &quot;what&quot; happened within domain as an event(s), but i was wondering if events can be used as input to domain model? For example, a person takes an action on a web UI, should it be modelled as an event that describes the intention of the end user? 
I see following choices
1. Pass primitive data types to the service method. the bits in the parameters represent the data entered by a user on UI screen
2. Pass a generic dto
3. Pass an intention revealing event.
If i go by step 3, then my application will have input events, output events, system events etc. 
Am i over engineering ? What are your thoughts?</description>
		<content:encoded><![CDATA[<p>Udi, i can see the value of representing &#8220;what&#8221; happened within domain as an event(s), but i was wondering if events can be used as input to domain model? For example, a person takes an action on a web UI, should it be modelled as an event that describes the intention of the end user?<br />
I see following choices<br />
1. Pass primitive data types to the service method. the bits in the parameters represent the data entered by a user on UI screen<br />
2. Pass a generic dto<br />
3. Pass an intention revealing event.<br />
If i go by step 3, then my application will have input events, output events, system events etc.<br />
Am i over engineering ? What are your thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/06/14/domain-events-salvation/comment-page-3/#comment-37371</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Thu, 05 Aug 2010 06:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1029#comment-37371</guid>
		<description>Rasmus,

Since the domain events are ultimately raised in-memory, there&#039;s no reason why it wouldn&#039;t work in a hosted web app environment.</description>
		<content:encoded><![CDATA[<p>Rasmus,</p>
<p>Since the domain events are ultimately raised in-memory, there&#8217;s no reason why it wouldn&#8217;t work in a hosted web app environment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

