<?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: From CRUD to Domain-Driven Fluency</title>
	<atom:link href="http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Sun, 14 Mar 2010 06:27:00 -0500</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/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36996</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36996</guid>
		<description>Andrew,

That kind of behavior can be built using the Active Record pattern instead of the Domain Model pattern. As you said, it is simple data manipulation and, as such, doesn&#039;t require it. That said, DDD is broader than the Domain Model pattern and there are many other useful elements to it that can still be applicable.</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>That kind of behavior can be built using the Active Record pattern instead of the Domain Model pattern. As you said, it is simple data manipulation and, as such, doesn&#8217;t require it. That said, DDD is broader than the Domain Model pattern and there are many other useful elements to it that can still be applicable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36994</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 22 Jan 2010 18:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36994</guid>
		<description>Hi udidahan,

Sorry to bother you again, i have read Eric Evan&#039;s book (maybe i should read it again) but I seem to struggle with what would appear in the domain side of things, everything seems to be a service/crud based method of the system. The examples given always seem to fit nicely with business logic (I think I may be interpreting my own system incorrectly) Would you mind suggesting a couple of typical domain methods for the following :

If i have an estate and this contains regions in the country and these contain houses, the user can add new regions to the estate and houses to regions and view the houses details.

Does this sound like something that warrents DDD or am I trying to fit something in that just doesnt fit, I cant believe this, as nearly all web based systems are just reflections over data at their core and merely provide facilities for the users to perform basic crud methods on a system.  Would you model the crud methods e.g. AddRegion as a domain method or just at the service level?

Sorry to be a pain, but this is one of the biggest hurdles I always have with DDD, if you can suggest any reading or articles, I would be extremely grateful (where did I put Erics book...)</description>
		<content:encoded><![CDATA[<p>Hi udidahan,</p>
<p>Sorry to bother you again, i have read Eric Evan&#8217;s book (maybe i should read it again) but I seem to struggle with what would appear in the domain side of things, everything seems to be a service/crud based method of the system. The examples given always seem to fit nicely with business logic (I think I may be interpreting my own system incorrectly) Would you mind suggesting a couple of typical domain methods for the following :</p>
<p>If i have an estate and this contains regions in the country and these contain houses, the user can add new regions to the estate and houses to regions and view the houses details.</p>
<p>Does this sound like something that warrents DDD or am I trying to fit something in that just doesnt fit, I cant believe this, as nearly all web based systems are just reflections over data at their core and merely provide facilities for the users to perform basic crud methods on a system.  Would you model the crud methods e.g. AddRegion as a domain method or just at the service level?</p>
<p>Sorry to be a pain, but this is one of the biggest hurdles I always have with DDD, if you can suggest any reading or articles, I would be extremely grateful (where did I put Erics book&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36990</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 20:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36990</guid>
		<description>Andrew,

I think that the issue is that the UI you&#039;re supporting is exposing that kind of functionality to the user. DDD applies to UI design as well.

The code in the post is indeed the implementation of service layer methods.</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>I think that the issue is that the UI you&#8217;re supporting is exposing that kind of functionality to the user. DDD applies to UI design as well.</p>
<p>The code in the post is indeed the implementation of service layer methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36989</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36989</guid>
		<description>Hi Udi, 

good post, always like reading your work but have a question, The original example (makes use of the session) looks more like a Unit of work service method than a traditional DDD method, is there anything wrong with the code you posted being placed in the service layer which makes use of the domain model?  the reason I ask is I am struggling when thinking in domain methods as most of the domain methods i think of really just model crud behaviour.  For example, I am working on some software right now where you basically have an estate which can have a number of sites and all I seem to be modelling is Estate.AddSite, Estate.RemoveSite etc.  And the only thing I seem to be putting in my domain object is validation e.g. the Site description cannot be blank...

Would you class these as domain methods or just service layer methods?
I think you&#039;re right in terms of this takes a whole different mind set !</description>
		<content:encoded><![CDATA[<p>Hi Udi, </p>
<p>good post, always like reading your work but have a question, The original example (makes use of the session) looks more like a Unit of work service method than a traditional DDD method, is there anything wrong with the code you posted being placed in the service layer which makes use of the domain model?  the reason I ask is I am struggling when thinking in domain methods as most of the domain methods i think of really just model crud behaviour.  For example, I am working on some software right now where you basically have an estate which can have a number of sites and all I seem to be modelling is Estate.AddSite, Estate.RemoveSite etc.  And the only thing I seem to be putting in my domain object is validation e.g. the Site description cannot be blank&#8230;</p>
<p>Would you class these as domain methods or just service layer methods?<br />
I think you&#8217;re right in terms of this takes a whole different mind set !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36115</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Tue, 28 Apr 2009 06:03:25 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36115</guid>
		<description>ryzam,

The service layer is inherently integration code and, as such, most suitable for integration testing (rather than unit testing).

The advantage of services talking directly to ISession is simplicity, and the ability to use the power of the framework chosen (NHibernate).</description>
		<content:encoded><![CDATA[<p>ryzam,</p>
<p>The service layer is inherently integration code and, as such, most suitable for integration testing (rather than unit testing).</p>
<p>The advantage of services talking directly to ISession is simplicity, and the ability to use the power of the framework chosen (NHibernate).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryzam</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36114</link>
		<dc:creator>ryzam</dc:creator>
		<pubDate>Tue, 28 Apr 2009 01:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36114</guid>
		<description>Sorry, my previous question was wrong, actually i would like to ask do you use ISession directly from your services?.. You already answer this thanks.

But if you are using directly, it seem that your services is taking repository function and how do you test it? What is the advantage to have services direct query/get data from dataaccess framework (for example NHibernate)

Thanks</description>
		<content:encoded><![CDATA[<p>Sorry, my previous question was wrong, actually i would like to ask do you use ISession directly from your services?.. You already answer this thanks.</p>
<p>But if you are using directly, it seem that your services is taking repository function and how do you test it? What is the advantage to have services direct query/get data from dataaccess framework (for example NHibernate)</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36113</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 27 Apr 2009 18:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36113</guid>
		<description>ryzam,

I&#039;m not sure what you mean by exposing ISession, but service layer code does make use of ISession directly, yes.</description>
		<content:encoded><![CDATA[<p>ryzam,</p>
<p>I&#8217;m not sure what you mean by exposing ISession, but service layer code does make use of ISession directly, yes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryzam</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-36112</link>
		<dc:creator>ryzam</dc:creator>
		<pubDate>Mon, 27 Apr 2009 08:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-36112</guid>
		<description>Do you expose ISession directly in services?..</description>
		<content:encoded><![CDATA[<p>Do you expose ISession directly in services?..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DDD &#38; Many to Many Object Relational Mapping</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-35954</link>
		<dc:creator>DDD &#38; Many to Many Object Relational Mapping</dc:creator>
		<pubDate>Sat, 24 Jan 2009 19:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-35954</guid>
		<description>[...] From CRUD to Domain-Driven Fluency [...]</description>
		<content:encoded><![CDATA[<p>[...] From CRUD to Domain-Driven Fluency [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-19915</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 30 Mar 2008 09:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-19915</guid>
		<description>Colin,

Glad you liked it.

Yes, I could have done that kind of constructor for Appointment. However, in terms of DDD, I don&#039;t see there being an appointment that could exist without an ICandidate. I also worry about &quot;generic&quot; Accept methods as they may guide people to thinking about the visitor pattern when that&#039;s not what is occuring.

I&#039;m not sure I&#039;m so much &quot;taking advantage of the features of the ORM&quot; so much as designing a persistent ignorant domain model.

On the issue of fluent interfaces - it just looks like I did something special. Actually, 

interviewer.ScheduleInterviewWith(candidate)

returns an IAppointmentThatHasNotBeenScheduled which has a method:

At(DateTime time);

So, while I don&#039;t explicitly go looking for how to use fluent interfaces in the domain model, the fact that I use intention revealing interfaces often leads to something that looks fluent. But usually, there is none of the chaining behavior found so often when doing the fluent thing.

Hope that makes sense.</description>
		<content:encoded><![CDATA[<p>Colin,</p>
<p>Glad you liked it.</p>
<p>Yes, I could have done that kind of constructor for Appointment. However, in terms of DDD, I don&#8217;t see there being an appointment that could exist without an ICandidate. I also worry about &#8220;generic&#8221; Accept methods as they may guide people to thinking about the visitor pattern when that&#8217;s not what is occuring.</p>
<p>I&#8217;m not sure I&#8217;m so much &#8220;taking advantage of the features of the ORM&#8221; so much as designing a persistent ignorant domain model.</p>
<p>On the issue of fluent interfaces &#8211; it just looks like I did something special. Actually, </p>
<p>interviewer.ScheduleInterviewWith(candidate)</p>
<p>returns an IAppointmentThatHasNotBeenScheduled which has a method:</p>
<p>At(DateTime time);</p>
<p>So, while I don&#8217;t explicitly go looking for how to use fluent interfaces in the domain model, the fact that I use intention revealing interfaces often leads to something that looks fluent. But usually, there is none of the chaining behavior found so often when doing the fluent thing.</p>
<p>Hope that makes sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Jack</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-19909</link>
		<dc:creator>Colin Jack</dc:creator>
		<pubDate>Sat, 29 Mar 2008 20:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-19909</guid>
		<description>Good blog entry but I think you&#039;ve been a little unfair with the &quot;before&quot; style code:

   Appointment appointment = new Appointment(message.RequestedTime, a.Candidate);
   interviewer.AddAppointment(appointment); 

Also whilst I like the example you provide I&#039;d also be happy with the service layer calling methods on the Appointment directly such as appointment.Accept() rather than calling ICandidate.Accept(appointment).

I also think theres really two points you are making here. One is that you think its good to take advantage of the features of the ORM so that when you save an interviewer its appointments are saved, the other is the fluent interface example.

I&#039;m also interested, do you use fluent interfaces a lot in the domain? So far I&#039;ve only found them useful for simple value objects and entities, particularly creation.</description>
		<content:encoded><![CDATA[<p>Good blog entry but I think you&#8217;ve been a little unfair with the &#8220;before&#8221; style code:</p>
<p>   Appointment appointment = new Appointment(message.RequestedTime, a.Candidate);<br />
   interviewer.AddAppointment(appointment); </p>
<p>Also whilst I like the example you provide I&#8217;d also be happy with the service layer calling methods on the Appointment directly such as appointment.Accept() rather than calling ICandidate.Accept(appointment).</p>
<p>I also think theres really two points you are making here. One is that you think its good to take advantage of the features of the ORM so that when you save an interviewer its appointments are saved, the other is the fluent interface example.</p>
<p>I&#8217;m also interested, do you use fluent interfaces a lot in the domain? So far I&#8217;ve only found them useful for simple value objects and entities, particularly creation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-19238</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 16 Mar 2008 15:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-19238</guid>
		<description>Alberto,

It looks like there will be a lot more systems to rewrite in the future with the growing popularity of RoR, doesn&#039;t it?

:)</description>
		<content:encoded><![CDATA[<p>Alberto,</p>
<p>It looks like there will be a lot more systems to rewrite in the future with the growing popularity of RoR, doesn&#8217;t it?</p>
<p> <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alberto Brandolini</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-19188</link>
		<dc:creator>Alberto Brandolini</dc:creator>
		<pubDate>Sat, 15 Mar 2008 12:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-19188</guid>
		<description>Definitely well explained.

I think CRUDs spoil the application, putting business logic in the user behaviour, instead that in the application. But the process of bringing the business logic back into the app is not always straightforward: you need to have smart people to interact with, different skills and motivation and probably some extra time.
Sometimes this is worth the effort, but some other times a quick collection of CRUDs, maybe implemented fast with Ruby on Rails or Grails is all you need, especially for small applications.

Alberto</description>
		<content:encoded><![CDATA[<p>Definitely well explained.</p>
<p>I think CRUDs spoil the application, putting business logic in the user behaviour, instead that in the application. But the process of bringing the business logic back into the app is not always straightforward: you need to have smart people to interact with, different skills and motivation and probably some extra time.<br />
Sometimes this is worth the effort, but some other times a quick collection of CRUDs, maybe implemented fast with Ruby on Rails or Grails is all you need, especially for small applications.</p>
<p>Alberto</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17466</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 18 Feb 2008 22:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17466</guid>
		<description>Hi Udi,

Thanks for the answer - I might go and track down some of the earlier posts - always an interesting discussion :)

Nick</description>
		<content:encoded><![CDATA[<p>Hi Udi,</p>
<p>Thanks for the answer &#8211; I might go and track down some of the earlier posts &#8211; always an interesting discussion <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17408</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 18 Feb 2008 06:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17408</guid>
		<description>Mark,

Session.Save is not called in &quot;interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);&quot;

The domain objects have no persistence code in them whatsoever.

The O/R Mapper needs to be configured in such a way so that persistence occurs by virtue of the fact that there is an unsaved appointment object in the interviewer&#039;s collection of appointments.

Does that make sense?</description>
		<content:encoded><![CDATA[<p>Mark,</p>
<p>Session.Save is not called in &#8220;interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);&#8221;</p>
<p>The domain objects have no persistence code in them whatsoever.</p>
<p>The O/R Mapper needs to be configured in such a way so that persistence occurs by virtue of the fact that there is an unsaved appointment object in the interviewer&#8217;s collection of appointments.</p>
<p>Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17407</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Mon, 18 Feb 2008 05:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17407</guid>
		<description>Nick,

I&#039;ve been seeing that question pop up multiple times on the DDD threads and have just stopped answering it there :)

The Domain Model is a self-contained component - it doesn&#039;t take dependencies on anything else. What it does is raise events that external code can use to make decisions about which external &quot;service&quot; to call.

Does that make sense?</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>I&#8217;ve been seeing that question pop up multiple times on the DDD threads and have just stopped answering it there <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The Domain Model is a self-contained component &#8211; it doesn&#8217;t take dependencies on anything else. What it does is raise events that external code can use to make decisions about which external &#8220;service&#8221; to call.</p>
<p>Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17397</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 18 Feb 2008 04:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17397</guid>
		<description>Quick question: 

In the &quot;traditional O/R mapping solution&quot;, we have:

using (ISession session = SessionFactory.OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
   ...
   session.Save(a);
   ...
}

In the &quot;domain-driven&quot; solution, I assume session.Save is called inside:

interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);

So, how do you have access to the session object here, as its not explicitly passed? Is session effectively an alias to a singleton then (does OpenSession return an existing open session if there is one)? Is this typical when using ORM?</description>
		<content:encoded><![CDATA[<p>Quick question: </p>
<p>In the &#8220;traditional O/R mapping solution&#8221;, we have:</p>
<p>using (ISession session = SessionFactory.OpenSession())<br />
using (ITransaction tx = session.BeginTransaction())<br />
{<br />
   &#8230;<br />
   session.Save(a);<br />
   &#8230;<br />
}</p>
<p>In the &#8220;domain-driven&#8221; solution, I assume session.Save is called inside:</p>
<p>interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);</p>
<p>So, how do you have access to the session object here, as its not explicitly passed? Is session effectively an alias to a singleton then (does OpenSession return an existing open session if there is one)? Is this typical when using ORM?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17356</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 17 Feb 2008 03:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17356</guid>
		<description>Excellently well-put. It is hard to explain the difference between creating data-oriented domain objects and giving them real responsibilities.

How do you handle the limitations that you hit when your domain objects need services in order to fulfil their responsibilities? Do you inject dependencies, pass dependencies through with method calls or keep your domain model self-contained and access external services from the calling code?</description>
		<content:encoded><![CDATA[<p>Excellently well-put. It is hard to explain the difference between creating data-oriented domain objects and giving them real responsibilities.</p>
<p>How do you handle the limitations that you hit when your domain objects need services in order to fulfil their responsibilities? Do you inject dependencies, pass dependencies through with method calls or keep your domain model self-contained and access external services from the calling code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17270</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 16 Feb 2008 09:13:06 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17270</guid>
		<description>Amit,

Of course the interviewer object will be creating an appointment object and adding it to its list. The thing is that that&#039;s encapsulated. If it were to add other objects as well, you wouldn&#039;t see that either.

You can see that by working entirely in memory that way in the domain model we can more easily unit test those business rules.

The service layer doesn&#039;t have to explicitly INSERT those objects in the DB. CRUD usually refers to the act of actually working against the DB interfaces - creating an object in memory and connecting it to (and with) other objects is rarely viewed as CRUD.

Does that make sense?</description>
		<content:encoded><![CDATA[<p>Amit,</p>
<p>Of course the interviewer object will be creating an appointment object and adding it to its list. The thing is that that&#8217;s encapsulated. If it were to add other objects as well, you wouldn&#8217;t see that either.</p>
<p>You can see that by working entirely in memory that way in the domain model we can more easily unit test those business rules.</p>
<p>The service layer doesn&#8217;t have to explicitly INSERT those objects in the DB. CRUD usually refers to the act of actually working against the DB interfaces &#8211; creating an object in memory and connecting it to (and with) other objects is rarely viewed as CRUD.</p>
<p>Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://www.udidahan.com/2008/02/15/from-crud-to-domain-driven-fluency/comment-page-1/#comment-17264</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Sat, 16 Feb 2008 07:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/02/15/from-crud-to-domain-driven-fluency/#comment-17264</guid>
		<description>Hi,    
ICandidateInterviewer interviewer = session.Get(message.InterviewerId);
    ICandidate candidate = session.Get(message.CandidateId);

    interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);
    tx.Commit();

Takes a candidate assigns him to interviewer with a time slot.

Now a level deep, interviewer.ScheduleInterviewWith is certainly going to perform CRUD (CREATE READ UPDATE And Delete over some memory space).
Isn’t it like CRUD with wrappers.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
ICandidateInterviewer interviewer = session.Get(message.InterviewerId);<br />
    ICandidate candidate = session.Get(message.CandidateId);</p>
<p>    interviewer.ScheduleInterviewWith(candidate).At(message.RequestedTime);<br />
    tx.Commit();</p>
<p>Takes a candidate assigns him to interviewer with a time slot.</p>
<p>Now a level deep, interviewer.ScheduleInterviewWith is certainly going to perform CRUD (CREATE READ UPDATE And Delete over some memory space).<br />
Isn’t it like CRUD with wrappers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
