<?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: MSDN Magazine Domain Model Article</title>
	<atom:link href="http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/</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/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36857</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 05 Dec 2009 23:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36857</guid>
		<description>Mike,

This would most likely be communicated via email.</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>This would most likely be communicated via email.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36856</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 02 Dec 2009 13:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36856</guid>
		<description>Hi Udi,

Great article, I just have one question in the SubmitOrder example where the business logic is moved to the Purchase method and a separate handler would handle if the order exceeds the limit of unpaid orders how would this be communicated to the user? I was wondering if the UI would be subscribed to this event and could then display a message.

Thanks,
Mike</description>
		<content:encoded><![CDATA[<p>Hi Udi,</p>
<p>Great article, I just have one question in the SubmitOrder example where the business logic is moved to the Purchase method and a separate handler would handle if the order exceeds the limit of unpaid orders how would this be communicated to the user? I was wondering if the UI would be subscribed to this event and could then display a message.</p>
<p>Thanks,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36621</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 29 Aug 2009 19:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36621</guid>
		<description>Szymon,

It means a lot to me to hear that the time I invest in simplifying things pays off - so thanks very much for your kind words.

The scenario you&#039;re asking about sounds like a pure entity-manipulation story, one that doesn&#039;t quite fit the purpose of CQS. Trying to shoe-horn it, it would be clear that the Query side would be responsible for filling in the dropdown, but creating an entity is rarely a command.

See this blog post for more information:

http://www.udidahan.com/2009/06/29/dont-create-aggregate-roots/

Hope that helps.</description>
		<content:encoded><![CDATA[<p>Szymon,</p>
<p>It means a lot to me to hear that the time I invest in simplifying things pays off &#8211; so thanks very much for your kind words.</p>
<p>The scenario you&#8217;re asking about sounds like a pure entity-manipulation story, one that doesn&#8217;t quite fit the purpose of CQS. Trying to shoe-horn it, it would be clear that the Query side would be responsible for filling in the dropdown, but creating an entity is rarely a command.</p>
<p>See this blog post for more information:</p>
<p><a href="http://www.udidahan.com/2009/06/29/dont-create-aggregate-roots/" rel="nofollow">http://www.udidahan.com/2009/06/29/dont-create-aggregate-roots/</a></p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szymon Kulec</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36614</link>
		<dc:creator>Szymon Kulec</dc:creator>
		<pubDate>Fri, 28 Aug 2009 06:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36614</guid>
		<description>Greetings Udi,

as always your article is a great source of knowledge. Although I&#039;m stunned by the simplicity of your Query/Domain separation which seems to me to be the most readable CQS example I&#039;ve ever seen, I have one doubt which is:

presume that in UI, on a form, you have a dropdown, which should be filled with the types of the entity you are creating. Where these types should come from? Query or Domain? If there are from Query, how the mapping from a simple int-key to the Domain object should be done?</description>
		<content:encoded><![CDATA[<p>Greetings Udi,</p>
<p>as always your article is a great source of knowledge. Although I&#8217;m stunned by the simplicity of your Query/Domain separation which seems to me to be the most readable CQS example I&#8217;ve ever seen, I have one doubt which is:</p>
<p>presume that in UI, on a form, you have a dropdown, which should be filled with the types of the entity you are creating. Where these types should come from? Query or Domain? If there are from Query, how the mapping from a simple int-key to the Domain object should be done?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36569</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 16 Aug 2009 10:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36569</guid>
		<description>Jan,

Happy to hear that it&#039;s working out well for you.</description>
		<content:encoded><![CDATA[<p>Jan,</p>
<p>Happy to hear that it&#8217;s working out well for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Ove Olsen</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36564</link>
		<dc:creator>Jan Ove Olsen</dc:creator>
		<pubDate>Sat, 15 Aug 2009 22:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36564</guid>
		<description>Hi Udi

Great article! This is an excellent way to keep both the service layer and the domain model pure.  We&#039;re using this clean up our service layer. We&#039;re moving all the &quot;do external stuff&quot; to handlers on domain events instead of having it in the service layer. This leaves the service layer very thin, it basically just manages transactions and calls a domain object. Keep up the good work, it has really made a difference for the better in my current project.</description>
		<content:encoded><![CDATA[<p>Hi Udi</p>
<p>Great article! This is an excellent way to keep both the service layer and the domain model pure.  We&#8217;re using this clean up our service layer. We&#8217;re moving all the &#8220;do external stuff&#8221; to handlers on domain events instead of having it in the service layer. This leaves the service layer very thin, it basically just manages transactions and calls a domain object. Keep up the good work, it has really made a difference for the better in my current project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36542</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Tue, 11 Aug 2009 11:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36542</guid>
		<description>Ryzam,

In the example you give, I&#039;d probably have Customer.ApproveLicense, which internally changes the LicenseStatus, raises an event - CustomerLicenseStatusChanged, which would be caught by a handler, which then sends the email.

Does that answer your question?</description>
		<content:encoded><![CDATA[<p>Ryzam,</p>
<p>In the example you give, I&#8217;d probably have Customer.ApproveLicense, which internally changes the LicenseStatus, raises an event &#8211; CustomerLicenseStatusChanged, which would be caught by a handler, which then sends the email.</p>
<p>Does that answer your question?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryzam</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36539</link>
		<dc:creator>ryzam</dc:creator>
		<pubDate>Mon, 10 Aug 2009 00:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36539</guid>
		<description>Thanks Udi,
I&#039;m new to this approach, need times to really understand.I have another questions.

1. Do you move all the business process responsiblity to handler? Example:

Admin can change Customer LicenseStatus and notification email will send to that customer.

public class Customer
{
  public LicenseStatus CurrentLicenseStatus {private set; get;}

  public void ChangeLicenseStatus(SendEmailWhenStatusChanged msg)
  {
     //Do you change the status here and raise the event after that?
     //or
     //Handler will cater all the process?

     //Option 1
     this.LicenseStatus  = LicenseStatus.Approved;
     //Do some other process the raise event
     
     DomainEvents.Raise(msg);

     //Option 2
     DomainEvents.Raise(msg);
  }
}</description>
		<content:encoded><![CDATA[<p>Thanks Udi,<br />
I&#8217;m new to this approach, need times to really understand.I have another questions.</p>
<p>1. Do you move all the business process responsiblity to handler? Example:</p>
<p>Admin can change Customer LicenseStatus and notification email will send to that customer.</p>
<p>public class Customer<br />
{<br />
  public LicenseStatus CurrentLicenseStatus {private set; get;}</p>
<p>  public void ChangeLicenseStatus(SendEmailWhenStatusChanged msg)<br />
  {<br />
     //Do you change the status here and raise the event after that?<br />
     //or<br />
     //Handler will cater all the process?</p>
<p>     //Option 1<br />
     this.LicenseStatus  = LicenseStatus.Approved;<br />
     //Do some other process the raise event</p>
<p>     DomainEvents.Raise(msg);</p>
<p>     //Option 2<br />
     DomainEvents.Raise(msg);<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36536</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 08 Aug 2009 18:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36536</guid>
		<description>Ryzam,

A Domain Service actually does the work, a Domain Event calls back to those who do the work. 

Hope that helps.</description>
		<content:encoded><![CDATA[<p>Ryzam,</p>
<p>A Domain Service actually does the work, a Domain Event calls back to those who do the work. </p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryzam</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36535</link>
		<dc:creator>ryzam</dc:creator>
		<pubDate>Sat, 08 Aug 2009 02:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36535</guid>
		<description>Hi Udi

What is the major different between DomainService and DomainEvent? After try your suggestion it seem that DomainEvent is similar to DomainService but instead of using normal call to object it will use event to call object and execute the method

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Udi</p>
<p>What is the major different between DomainService and DomainEvent? After try your suggestion it seem that DomainEvent is similar to DomainService but instead of using normal call to object it will use event to call object and execute the method</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36532</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Thu, 06 Aug 2009 06:22:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36532</guid>
		<description>Erik,

Thanks.

An entity/class doesn&#039;t necessarily &quot;own&quot; the domain events it raises. Multiple entities can raise the same kind of event.

Between bounded contexts, I do use a kind of message/service bus, yes. One of the things we&#039;ve been targeting with nServiceBus is a lighter-weight debugging model, but there&#039;s still some way to go.

For a testing scenario, you could wire in your own handlers to do whatever you wanted, but I wouldn&#039;t see that as a real context map.

Hope that answers your questions.</description>
		<content:encoded><![CDATA[<p>Erik,</p>
<p>Thanks.</p>
<p>An entity/class doesn&#8217;t necessarily &#8220;own&#8221; the domain events it raises. Multiple entities can raise the same kind of event.</p>
<p>Between bounded contexts, I do use a kind of message/service bus, yes. One of the things we&#8217;ve been targeting with nServiceBus is a lighter-weight debugging model, but there&#8217;s still some way to go.</p>
<p>For a testing scenario, you could wire in your own handlers to do whatever you wanted, but I wouldn&#8217;t see that as a real context map.</p>
<p>Hope that answers your questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36529</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Wed, 05 Aug 2009 20:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36529</guid>
		<description>Udi,
   Good article.  I have a couple of questions.  

1.  Does a class own the events it Raises or Can multiple classes call the same events;

2.  With Bounded Contexts, do you always uses NService bus to communicate between bouded contexts, or do you ever do it in process in production or during a debug/testing phase.  i.e would you ever see the case where a set of DomainEventHandlers became your context map between contexts (for a testing scenario) or say if the contexts were part of the same service?  

Thanks,

Erik</description>
		<content:encoded><![CDATA[<p>Udi,<br />
   Good article.  I have a couple of questions.  </p>
<p>1.  Does a class own the events it Raises or Can multiple classes call the same events;</p>
<p>2.  With Bounded Contexts, do you always uses NService bus to communicate between bouded contexts, or do you ever do it in process in production or during a debug/testing phase.  i.e would you ever see the case where a set of DomainEventHandlers became your context map between contexts (for a testing scenario) or say if the contexts were part of the same service?  </p>
<p>Thanks,</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36527</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:55:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36527</guid>
		<description>AT,

My pleasure.
To your questions:

1. Domain events call synchronously back into registered code. If that code decides to fire and forget some messages elsewhere, that&#039;s its choice. There could be two different handlers, one that does fire and forget, the other that calls back down into the same transaction.

2. The service layer&#039;s responsibility is to handle the message that arrives while delegating business logic to the domain model.

The process that you describe is probably not what would necessarily happen - inventory can be handled by a separate transaction later. Discounts could also be handled by a separate bounded context, being consistent within a couple of seconds of the first.

These processes are usually handled by events between bounded contexts - not the service layer. There&#039;s plenty of flexibility in that approach.

Hope that answers your questions.</description>
		<content:encoded><![CDATA[<p>AT,</p>
<p>My pleasure.<br />
To your questions:</p>
<p>1. Domain events call synchronously back into registered code. If that code decides to fire and forget some messages elsewhere, that&#8217;s its choice. There could be two different handlers, one that does fire and forget, the other that calls back down into the same transaction.</p>
<p>2. The service layer&#8217;s responsibility is to handle the message that arrives while delegating business logic to the domain model.</p>
<p>The process that you describe is probably not what would necessarily happen &#8211; inventory can be handled by a separate transaction later. Discounts could also be handled by a separate bounded context, being consistent within a couple of seconds of the first.</p>
<p>These processes are usually handled by events between bounded contexts &#8211; not the service layer. There&#8217;s plenty of flexibility in that approach.</p>
<p>Hope that answers your questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36525</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:43:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36525</guid>
		<description>Bjorn,

Since you&#039;d want all those activities to succeed or fail together, you&#039;d want them all running in the same transaction, meaning that the service layer would still need to manage things.</description>
		<content:encoded><![CDATA[<p>Bjorn,</p>
<p>Since you&#8217;d want all those activities to succeed or fail together, you&#8217;d want them all running in the same transaction, meaning that the service layer would still need to manage things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AT</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36524</link>
		<dc:creator>AT</dc:creator>
		<pubDate>Wed, 05 Aug 2009 13:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36524</guid>
		<description>Hi Udi,
I really liked your article. Big thanks for sharing knowledge. 
Couple of questions. 
1. Are domain events are for fire and forget operations only or they participate in business transactions i.e. 
2. What are resposiblities of service layer? If there is single api for domain process then there is little for service layer besides starting transaction. i.e. Adding item to shopping cart.
Service layer coordinating steps. 
a. Check inventory
b. Check product discounts 
c. Check special customer discounts (preferred custormer)
d. call shoppingcart.additem(product)

Service layer just calling single Api domain model.
call shoppingcart.additem(product) which encapsulates above steps. 

First process is more customizable/flexible for different scenarios. Different discounts   but in a way business rules are implemented there. 
Second hides everything away but loses flexiblity.</description>
		<content:encoded><![CDATA[<p>Hi Udi,<br />
I really liked your article. Big thanks for sharing knowledge.<br />
Couple of questions.<br />
1. Are domain events are for fire and forget operations only or they participate in business transactions i.e.<br />
2. What are resposiblities of service layer? If there is single api for domain process then there is little for service layer besides starting transaction. i.e. Adding item to shopping cart.<br />
Service layer coordinating steps.<br />
a. Check inventory<br />
b. Check product discounts<br />
c. Check special customer discounts (preferred custormer)<br />
d. call shoppingcart.additem(product)</p>
<p>Service layer just calling single Api domain model.<br />
call shoppingcart.additem(product) which encapsulates above steps. </p>
<p>First process is more customizable/flexible for different scenarios. Different discounts   but in a way business rules are implemented there.<br />
Second hides everything away but loses flexiblity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjorn</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36523</link>
		<dc:creator>Bjorn</dc:creator>
		<pubDate>Wed, 05 Aug 2009 11:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36523</guid>
		<description>What about when you have vanilla DAOs below your repos instead of some OR mapper. Then a repository operation on an aggregate would likely involve hand-coded SQL-operations in the DAOs on more than one table. Is it still the service layer that should start the transaction or should it be done by the repository that encapsulates the DAOs?</description>
		<content:encoded><![CDATA[<p>What about when you have vanilla DAOs below your repos instead of some OR mapper. Then a repository operation on an aggregate would likely involve hand-coded SQL-operations in the DAOs on more than one table. Is it still the service layer that should start the transaction or should it be done by the repository that encapsulates the DAOs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36522</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Tue, 04 Aug 2009 18:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36522</guid>
		<description>Bjorn,

I did mean &quot;that transactions should actually NOT be handled in domain objects&quot;.

Hope that helps.</description>
		<content:encoded><![CDATA[<p>Bjorn,</p>
<p>I did mean &#8220;that transactions should actually NOT be handled in domain objects&#8221;.</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjorn</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36520</link>
		<dc:creator>Bjorn</dc:creator>
		<pubDate>Tue, 04 Aug 2009 10:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36520</guid>
		<description>Hi Udi and thanks for another great article.

In your section on concurrency you let the consuming code decide that the purchase method of the customer model should be a transaction. Is this just an example on how to deal with concurrency or do you mean that transactions should actually NOT be handled in domain objects?

/Bjorn</description>
		<content:encoded><![CDATA[<p>Hi Udi and thanks for another great article.</p>
<p>In your section on concurrency you let the consuming code decide that the purchase method of the customer model should be a transaction. Is this just an example on how to deal with concurrency or do you mean that transactions should actually NOT be handled in domain objects?</p>
<p>/Bjorn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36517</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 03 Aug 2009 18:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36517</guid>
		<description>Joe,

Glad you liked it.

While the domain object *could* have an instance of the bus injected into it, that would break its encapsulation - requiring it to know about the message schema as well. Better for it to just say what happened - logically, and let something else handle the rest.

Does that answer your question?</description>
		<content:encoded><![CDATA[<p>Joe,</p>
<p>Glad you liked it.</p>
<p>While the domain object *could* have an instance of the bus injected into it, that would break its encapsulation &#8211; requiring it to know about the message schema as well. Better for it to just say what happened &#8211; logically, and let something else handle the rest.</p>
<p>Does that answer your question?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36515</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 03 Aug 2009 12:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36515</guid>
		<description>Hi Udi,

I really enjoyed reading your article. I went back and read your post about domain events &quot;Domain Events - Salvation Sunday, June 14th, 2009&quot;. I am a bit confused on the relationship between domain events and service buses like NServiceBus. For example, the customer.DoSomething() method raises a domain event, could it not send a message with NServiceBus and do the same thing? How would you choose one implementation over the other?</description>
		<content:encoded><![CDATA[<p>Hi Udi,</p>
<p>I really enjoyed reading your article. I went back and read your post about domain events &#8220;Domain Events &#8211; Salvation Sunday, June 14th, 2009&#8243;. I am a bit confused on the relationship between domain events and service buses like NServiceBus. For example, the customer.DoSomething() method raises a domain event, could it not send a message with NServiceBus and do the same thing? How would you choose one implementation over the other?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36512</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 03 Aug 2009 04:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36512</guid>
		<description>Roxin,

It really depends on a lot of other detail that I wasn&#039;t able to fit in to the article. For example, the shopping cart itself could have already taken into account all the discounts before the customer actually performs the purchase. That logic could also be put in a different bounded context.

That keeps any entity from getting too large.</description>
		<content:encoded><![CDATA[<p>Roxin,</p>
<p>It really depends on a lot of other detail that I wasn&#8217;t able to fit in to the article. For example, the shopping cart itself could have already taken into account all the discounts before the customer actually performs the purchase. That logic could also be put in a different bounded context.</p>
<p>That keeps any entity from getting too large.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36511</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 03 Aug 2009 04:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36511</guid>
		<description>Victor,

Finer requirements around reports/queries usually deal with horizontal filtering - which rows is this specific user authorized to see.

That behavior really doesn&#039;t belong on the entities themselves. A better place to put it would be as a set of filter objects which acts upon the rows before they are shown to the user. This is a good candidate for a pluggable design allowing multiple bounded contexts to contribute their own filters.

I hope you&#039;ll forgive me not mentioning this important point.</description>
		<content:encoded><![CDATA[<p>Victor,</p>
<p>Finer requirements around reports/queries usually deal with horizontal filtering &#8211; which rows is this specific user authorized to see.</p>
<p>That behavior really doesn&#8217;t belong on the entities themselves. A better place to put it would be as a set of filter objects which acts upon the rows before they are shown to the user. This is a good candidate for a pluggable design allowing multiple bounded contexts to contribute their own filters.</p>
<p>I hope you&#8217;ll forgive me not mentioning this important point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roxin</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36510</link>
		<dc:creator>roxin</dc:creator>
		<pubDate>Mon, 03 Aug 2009 02:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36510</guid>
		<description>Hi,

customer.Purchase(shoppingCart);

Wouldn&#039;t that line be better off on a domain service rather than the customer ? When purchasing you might check for some discounts that you can apply to the customer (with a list of discount levels coming from the db ) or some other stuff - would you still have the method on the customer ?

I&#039;m thinking that having &quot;customer.Purchase(shoppingCart)&quot; will make the entity quite a large class after a while .</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>customer.Purchase(shoppingCart);</p>
<p>Wouldn&#8217;t that line be better off on a domain service rather than the customer ? When purchasing you might check for some discounts that you can apply to the customer (with a list of discount levels coming from the db ) or some other stuff &#8211; would you still have the method on the customer ?</p>
<p>I&#8217;m thinking that having &#8220;customer.Purchase(shoppingCart)&#8221; will make the entity quite a large class after a while .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Kornov</title>
		<link>http://www.udidahan.com/2009/08/02/msdn-magazine-domain-model-article/comment-page-1/#comment-36509</link>
		<dc:creator>Victor Kornov</dc:creator>
		<pubDate>Sun, 02 Aug 2009 23:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.udidahan.com/?p=1063#comment-36509</guid>
		<description>The MSDN article is an interesting read, as usual.
I was put off a bit by the comment &quot;...If you don&#039;t need the behavior found on those domain model classes, why plough through them to get at their data?..&quot; This is totally reasonable when you really do not need domain behavior/rules in your reports (queries). But what if you do need them? I would like the article to at least mention those cases ;) Otherwise it looks like you intentionally didn&#039;t mention that to prove main point of the article. I mean things like exceptions vs. returns codes did get a least a short comment.</description>
		<content:encoded><![CDATA[<p>The MSDN article is an interesting read, as usual.<br />
I was put off a bit by the comment &#8220;&#8230;If you don&#8217;t need the behavior found on those domain model classes, why plough through them to get at their data?..&#8221; This is totally reasonable when you really do not need domain behavior/rules in your reports (queries). But what if you do need them? I would like the article to at least mention those cases <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Otherwise it looks like you intentionally didn&#8217;t mention that to prove main point of the article. I mean things like exceptions vs. returns codes did get a least a short comment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

