<?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: DTOs Simplify Complex Screens</title>
	<atom:link href="http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dtos-simplify-complex-screens</link>
	<description></description>
	<lastBuildDate>Tue, 08 May 2012 09:13:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jason</title>
		<link>http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/comment-page-1/#comment-14478</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 05 Nov 2007 16:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/#comment-14478</guid>
		<description>Jarod - yes there is a terminology issue here. JP himself was called on this: http://www.jpboodhoo.com/blog/ScreenBoundDTOUpdateGettingTheTerminologyRight.aspx.

Regarding validation I don&#039;t really see that this scenario creates an additional problem. Typically I treat validation is a screen level concern (at least when there are screens involved!). I don&#039;t like this but with another approach you need a way to map errors back to fields and I have not determined a good way to do this. I don&#039;t like the ASP.NET validation controls (especially from a testability POV) but they do solve the problem.

Note that the previous paragraph is all theory as I have not yet tackled DTO validation...but that will change today (if I ever stop responding to comments!). I&#039;ll do a follow up post on what happens.

Regarding the additional repository method I am not completely comfortable with this either. I am a firm believer in avoiding premature optimization. As I indicated in the original posting my concern about DTOs is that they were superfluous because they didn&#039;t add value. I don&#039;t expect that I will use them all the time, just where necessary. It remains to be seen how often this turns out to be.</description>
		<content:encoded><![CDATA[<p>Jarod &#8211; yes there is a terminology issue here. JP himself was called on this: <a href="http://www.jpboodhoo.com/blog/ScreenBoundDTOUpdateGettingTheTerminologyRight.aspx" rel="nofollow">http://www.jpboodhoo.com/blog/ScreenBoundDTOUpdateGettingTheTerminologyRight.aspx</a>.</p>
<p>Regarding validation I don&#8217;t really see that this scenario creates an additional problem. Typically I treat validation is a screen level concern (at least when there are screens involved!). I don&#8217;t like this but with another approach you need a way to map errors back to fields and I have not determined a good way to do this. I don&#8217;t like the ASP.NET validation controls (especially from a testability POV) but they do solve the problem.</p>
<p>Note that the previous paragraph is all theory as I have not yet tackled DTO validation&#8230;but that will change today (if I ever stop responding to comments!). I&#8217;ll do a follow up post on what happens.</p>
<p>Regarding the additional repository method I am not completely comfortable with this either. I am a firm believer in avoiding premature optimization. As I indicated in the original posting my concern about DTOs is that they were superfluous because they didn&#8217;t add value. I don&#8217;t expect that I will use them all the time, just where necessary. It remains to be seen how often this turns out to be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarod</title>
		<link>http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/comment-page-1/#comment-14422</link>
		<dc:creator>Jarod</dc:creator>
		<pubDate>Mon, 05 Nov 2007 04:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/#comment-14422</guid>
		<description>Jason,
I like your solution using projection to form a view specific entity, but am confused with the pattern terminology. Does the problem space really call for a DTO or more of a presentation entity? (Presentation Model)  I guess I see DTO&#039;s as objects which get moved between tiers, a classic example being webservices or remoting. They may provide aggregation\facade of the domain, but thats about it. 

It seems like in this scenario calling the customer a DTO has implications, especially if you were to apply it to a larger enterpise (which you were clearly not, but I cant help myself!). One I can think of is Validation, which would fall on the CustomerDTO since it is more or less bound to the view. Another is that we have created a repository method which returns a CustomerDTO specifically for the behavior of this view. 

Would you do it different in a greenfield enterprise scenario? Again, very cool stuff.</description>
		<content:encoded><![CDATA[<p>Jason,<br />
I like your solution using projection to form a view specific entity, but am confused with the pattern terminology. Does the problem space really call for a DTO or more of a presentation entity? (Presentation Model)  I guess I see DTO&#8217;s as objects which get moved between tiers, a classic example being webservices or remoting. They may provide aggregation\facade of the domain, but thats about it. </p>
<p>It seems like in this scenario calling the customer a DTO has implications, especially if you were to apply it to a larger enterpise (which you were clearly not, but I cant help myself!). One I can think of is Validation, which would fall on the CustomerDTO since it is more or less bound to the view. Another is that we have created a repository method which returns a CustomerDTO specifically for the behavior of this view. </p>
<p>Would you do it different in a greenfield enterprise scenario? Again, very cool stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/comment-page-1/#comment-14306</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 04 Nov 2007 04:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/#comment-14306</guid>
		<description>Certainly one of the things that DTOs buy you is flexibility in the the order that tasks are completed. However even without DTOs I am still constructing the domain entities before the associated database objects. My repositories are often stubs that return canned data. In fact I&#039;ve even developed an entire (small!) application before I even created the database. TDD is the primary reason that I&#039;ve ended up here - it&#039;s much easier to test the domain than the database. Evolutionary design really does work...if you have supporting tests.</description>
		<content:encoded><![CDATA[<p>Certainly one of the things that DTOs buy you is flexibility in the the order that tasks are completed. However even without DTOs I am still constructing the domain entities before the associated database objects. My repositories are often stubs that return canned data. In fact I&#8217;ve even developed an entire (small!) application before I even created the database. TDD is the primary reason that I&#8217;ve ended up here &#8211; it&#8217;s much easier to test the domain than the database. Evolutionary design really does work&#8230;if you have supporting tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/comment-page-1/#comment-14286</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Sun, 04 Nov 2007 00:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2007/11/02/dtos-simplify-complex-screens/#comment-14286</guid>
		<description>&quot;Once the screen was working I fixed the domain model.&quot;

To me thats an interesting approach -- its been drilled into me, and I&#039;ve taken it as gospel that the database and back-end whatevers all need to come before the screens.  How well does this approach work in comparison?  I can see some huge opportunities here, but on the flip side people older and wiser than me have said differently.</description>
		<content:encoded><![CDATA[<p>&#8220;Once the screen was working I fixed the domain model.&#8221;</p>
<p>To me thats an interesting approach &#8212; its been drilled into me, and I&#8217;ve taken it as gospel that the database and back-end whatevers all need to come before the screens.  How well does this approach work in comparison?  I can see some huge opportunities here, but on the flip side people older and wiser than me have said differently.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

