<?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: Presentation Model: &quot;Screen&quot; Store Example</title>
	<atom:link href="http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Fri, 15 Oct 2010 23:08:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Colin Jack</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-51</link>
		<dc:creator>Colin Jack</dc:creator>
		<pubDate>Mon, 19 Nov 2007 18:07:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-51</guid>
		<description>Ta for the example, someone really needs to write a codebase to make object to object mapping like this easy. I&#039;m all for using TDD to develop the interfaces of the presentation DTOs but have Having to write the code/tests for the mapping by hand each time seems very painful. Did you ever look at using Spring, we&#039;ve thought about it but we aren&#039;t using presentation DTOs yet so there hasn&#039;t been a big need:

http://forum.springframework.net/showthread.php?t=822

&gt; the benefits of explicitly creating interfaces, even for domain objects

I find this thread useful when considering mocking the domain:

http://tech.groups.yahoo.com/group/domaindrivendesign/message/5683

Personally I don&#039;t think I like mocking domain classes, especially not when it affects the design (e.g. requiring every class to support an interface or virtual members). Part of the problem, for me at least, is that if you scale this up any important abstractions are going to get lost in all the IFoo interfaces you include for mapping. Mind you when I do need a little mocking I turn to TypeMock anyway (guilty pleasure :)).</description>
		<content:encoded><![CDATA[<p>Ta for the example, someone really needs to write a codebase to make object to object mapping like this easy. I&#8217;m all for using TDD to develop the interfaces of the presentation DTOs but have Having to write the code/tests for the mapping by hand each time seems very painful. Did you ever look at using Spring, we&#8217;ve thought about it but we aren&#8217;t using presentation DTOs yet so there hasn&#8217;t been a big need:</p>
<p><a href="http://forum.springframework.net/showthread.php?t=822" rel="nofollow">http://forum.springframework.net/showthread.php?t=822</a></p>
<p>> the benefits of explicitly creating interfaces, even for domain objects</p>
<p>I find this thread useful when considering mocking the domain:</p>
<p><a href="http://tech.groups.yahoo.com/group/domaindrivendesign/message/5683" rel="nofollow">http://tech.groups.yahoo.com/group/domaindrivendesign/message/5683</a></p>
<p>Personally I don&#8217;t think I like mocking domain classes, especially not when it affects the design (e.g. requiring every class to support an interface or virtual members). Part of the problem, for me at least, is that if you scale this up any important abstractions are going to get lost in all the IFoo interfaces you include for mapping. Mind you when I do need a little mocking I turn to TypeMock anyway (guilty pleasure <img src='http://lostechies.com/joeybeninghove/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BB</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-50</link>
		<dc:creator>BB</dc:creator>
		<pubDate>Wed, 10 Oct 2007 17:04:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-50</guid>
		<description>Thanks for the clear answer! It helped me understand the reasoning behind the mocking of the domain objects. Looking forward to mentioned post!</description>
		<content:encoded><![CDATA[<p>Thanks for the clear answer! It helped me understand the reasoning behind the mocking of the domain objects. Looking forward to mentioned post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joeyDotNet</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-49</link>
		<dc:creator>joeyDotNet</dc:creator>
		<pubDate>Wed, 10 Oct 2007 15:54:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-49</guid>
		<description>@BB,
I have a post kinda in the works that explains some of the benefits of explicitly creating interfaces, even for domain objects (like the Monitor in the example).

The quick answer is that when possible, I like to encapsulate as much behavior and object interactions within the domain objects themselves.  So if I&#039;m writing a test for a service that has to perform some actions on a domain object, I don&#039;t necessarily care *how* the domain object does what it does.  I only care that the service is making the calls to the domain object.  

The way all this relates is that if I was working with a concrete domain object, in which the behaviors might be complex (i.e. involving other objects, etc...), I may have to go through a possibly complex &quot;set up&quot; process to get the domain object in the needed state before it can be used in the service test.  Patterns like ObjectMother and Builders can help with this and it is something I&#039;m looking into.  

But, in my service test, if I can just set up a couple expectations on my domain object&#039;s interface, it removes the need for the service test to know *how* the domain object does anything and/or interacts with other domain objects.

Hope that somewhat answers your question for now.  :)</description>
		<content:encoded><![CDATA[<p>@BB,<br />
I have a post kinda in the works that explains some of the benefits of explicitly creating interfaces, even for domain objects (like the Monitor in the example).</p>
<p>The quick answer is that when possible, I like to encapsulate as much behavior and object interactions within the domain objects themselves.  So if I&#8217;m writing a test for a service that has to perform some actions on a domain object, I don&#8217;t necessarily care *how* the domain object does what it does.  I only care that the service is making the calls to the domain object.  </p>
<p>The way all this relates is that if I was working with a concrete domain object, in which the behaviors might be complex (i.e. involving other objects, etc&#8230;), I may have to go through a possibly complex &#8220;set up&#8221; process to get the domain object in the needed state before it can be used in the service test.  Patterns like ObjectMother and Builders can help with this and it is something I&#8217;m looking into.  </p>
<p>But, in my service test, if I can just set up a couple expectations on my domain object&#8217;s interface, it removes the need for the service test to know *how* the domain object does anything and/or interacts with other domain objects.</p>
<p>Hope that somewhat answers your question for now.  <img src='http://lostechies.com/joeybeninghove/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BB</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-48</link>
		<dc:creator>BB</dc:creator>
		<pubDate>Sat, 06 Oct 2007 08:01:25 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-48</guid>
		<description>Great post, and code example. I&#039;m fairly new to mocking and therefore wondered what are the benefits of using mocking for creating the monitor objects in the test fixture? Wouldn&#039;t it be simpler (and more readable) to just create the monitors using the domain class?</description>
		<content:encoded><![CDATA[<p>Great post, and code example. I&#8217;m fairly new to mocking and therefore wondered what are the benefits of using mocking for creating the monitor objects in the test fixture? Wouldn&#8217;t it be simpler (and more readable) to just create the monitors using the domain class?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-47</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Tue, 02 Oct 2007 22:18:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-47</guid>
		<description>Count me in.  I&#039;m downloading now.  Very cool post.  Good idea to keep us active.  Google Code rules!</description>
		<content:encoded><![CDATA[<p>Count me in.  I&#8217;m downloading now.  Very cool post.  Good idea to keep us active.  Google Code rules!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joeyDotNet</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-46</link>
		<dc:creator>joeyDotNet</dc:creator>
		<pubDate>Tue, 02 Oct 2007 21:29:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-46</guid>
		<description>Doh!  Sorry about that.  Thanks for setting me straight Ben.</description>
		<content:encoded><![CDATA[<p>Doh!  Sorry about that.  Thanks for setting me straight Ben.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scheirman</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-45</link>
		<dc:creator>Ben Scheirman</dc:creator>
		<pubDate>Tue, 02 Oct 2007 21:16:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-45</guid>
		<description>Oops, It must be case sensitive or something I don&#039;t know.  Browsing the repository in googlecode shows it just fine.

For your readers, if you want to check out the code in SVN, here&#039;s the command:

svn checkout http://joeydotnet.googlecode.com/svn/joeyDotNet/samples/Screen.Specific.DTOs/
</description>
		<content:encoded><![CDATA[<p>Oops, It must be case sensitive or something I don&#8217;t know.  Browsing the repository in googlecode shows it just fine.</p>
<p>For your readers, if you want to check out the code in SVN, here&#8217;s the command:</p>
<p>svn checkout <a href="http://joeydotnet.googlecode.com/svn/joeyDotNet/samples/Screen.Specific.DTOs/" rel="nofollow">http://joeydotnet.googlecode.com/svn/joeyDotNet/samples/Screen.Specific.DTOs/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scheirman</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/02/presentation-model-quot-screen-quot-store-example/#comment-44</link>
		<dc:creator>Ben Scheirman</dc:creator>
		<pubDate>Tue, 02 Oct 2007 21:14:16 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/02/presentation-model-quot-screen-quot-store-example.aspx#comment-44</guid>
		<description>Joey you rock.  I&#039;m downloading the code now and I&#039;ll post my flames in a bit :)    j/k

FYI:  Googlecode&#039;s svn link says http://joeydotnet.googlecode.com/svn/trunk  but there is no &quot;trunk&quot; folder.  I removed this and it worked.</description>
		<content:encoded><![CDATA[<p>Joey you rock.  I&#8217;m downloading the code now and I&#8217;ll post my flames in a bit <img src='http://lostechies.com/joeybeninghove/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />     j/k</p>
<p>FYI:  Googlecode&#8217;s svn link says <a href="http://joeydotnet.googlecode.com/svn/trunk" rel="nofollow">http://joeydotnet.googlecode.com/svn/trunk</a>  but there is no &#8220;trunk&#8221; folder.  I removed this and it worked.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
