<?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: Hey, I Think I&#8217;ve Invented a New Pattern</title>
	<atom:link href="http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/</link>
	<description>George Mauer is on the net</description>
	<lastBuildDate>Sun, 16 May 2010 17:22:49 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: togakangaroo</title>
		<link>http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/comment-page-1/#comment-77</link>
		<dc:creator>togakangaroo</dc:creator>
		<pubDate>Tue, 19 Jan 2010 20:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://georgemauer.net/blog/?p=119#comment-77</guid>
		<description>Put this out there and then realize I made a mistake.  While the pattern is still good, the example is off.  It seems like the CrystalReports ReportDocument object occasionally needs to be exposed of explicitly (god I hate CrystalReports).  So the modified example would be:
using(var doc = 
   _dataProvider  
  .GetOrderDataFor(customerId)  
  .ComposeIntoReportUsing(_reportGenerator) ) {
  return doc.ToStreamUsing(_pdfReportExporter);  
}

Not nearly as slick but when you hit up against framework limitations what can you do.</description>
		<content:encoded><![CDATA[<p>Put this out there and then realize I made a mistake.  While the pattern is still good, the example is off.  It seems like the CrystalReports ReportDocument object occasionally needs to be exposed of explicitly (god I hate CrystalReports).  So the modified example would be:<br />
using(var doc =<br />
   _dataProvider<br />
  .GetOrderDataFor(customerId)<br />
  .ComposeIntoReportUsing(_reportGenerator) ) {<br />
  return doc.ToStreamUsing(_pdfReportExporter);<br />
}</p>
<p>Not nearly as slick but when you hit up against framework limitations what can you do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: togakangaroo</title>
		<link>http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/comment-page-1/#comment-76</link>
		<dc:creator>togakangaroo</dc:creator>
		<pubDate>Tue, 19 Jan 2010 14:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://georgemauer.net/blog/?p=119#comment-76</guid>
		<description>@Laura
And I do appreciate it.

@Fritz
Now you know I love my decorators but not really.  Decorators might looks something like this at the point of configuration, this is at the point of usage - and that makes a world of difference.

Another post perhaps, but I find that adapters and factories can play a part:
return _dataProvider  
  .GetOrderDataFor(customerId)  
  .ComposeIntoReportUsing(_reportGenerator)  
  .ToStreamUsing(_pdfReportExporter)
  .AttachToMailMessage(new MailMessage(&quot;fred.flintstone@brock.com&quot;, &quot;BRubble@brock.com&quot;))
  .SendUsing(_smtpAdapter);  
// Where _smtpAdapter simply wraps the SmtpMail.Send call

return _dataProvider  
  .GetOrderDataFor(customerId)  
  .ComposeIntoReportUsing(_reportGeneratorFactory.Get(reportParameter1, reportParameter2))  
  .ToStreamUsing(_pdfReportExporter);
// When you also need to inject parameters into the report in addition to the dataset</description>
		<content:encoded><![CDATA[<p>@Laura<br />
And I do appreciate it.</p>
<p>@Fritz<br />
Now you know I love my decorators but not really.  Decorators might looks something like this at the point of configuration, this is at the point of usage &#8211; and that makes a world of difference.</p>
<p>Another post perhaps, but I find that adapters and factories can play a part:<br />
return _dataProvider<br />
  .GetOrderDataFor(customerId)<br />
  .ComposeIntoReportUsing(_reportGenerator)<br />
  .ToStreamUsing(_pdfReportExporter)<br />
  .AttachToMailMessage(new MailMessage(&#8221;fred.flintstone@brock.com&#8221;, &#8220;BRubble@brock.com&#8221;))<br />
  .SendUsing(_smtpAdapter);<br />
// Where _smtpAdapter simply wraps the SmtpMail.Send call</p>
<p>return _dataProvider<br />
  .GetOrderDataFor(customerId)<br />
  .ComposeIntoReportUsing(_reportGeneratorFactory.Get(reportParameter1, reportParameter2))<br />
  .ToStreamUsing(_pdfReportExporter);<br />
// When you also need to inject parameters into the report in addition to the dataset</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fritz</title>
		<link>http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/comment-page-1/#comment-75</link>
		<dc:creator>Fritz</dc:creator>
		<pubDate>Mon, 18 Jan 2010 23:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://georgemauer.net/blog/?p=119#comment-75</guid>
		<description>It has a vaguely decorator-ish flavor to it.</description>
		<content:encoded><![CDATA[<p>It has a vaguely decorator-ish flavor to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laura Veazey</title>
		<link>http://georgemauer.net/blog/hey-i-think-ive-invented-a-new-pattern/comment-page-1/#comment-74</link>
		<dc:creator>Laura Veazey</dc:creator>
		<pubDate>Mon, 18 Jan 2010 21:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://georgemauer.net/blog/?p=119#comment-74</guid>
		<description>Wow. I don&#039;t understand any of this. But at least I commented.</description>
		<content:encoded><![CDATA[<p>Wow. I don&#8217;t understand any of this. But at least I commented.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
