<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wizards of Smart &#187; Design Patterns</title>
	<atom:link href="http://wizardsofsmart.net/tag/design-patterns/feed/" rel="self" type="application/rss+xml" />
	<link>http://wizardsofsmart.net</link>
	<description>.NET Design Patterns</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:40:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-beta2-14896</generator>
		<item>
		<title>Refactoring with the Decorator Pattern</title>
		<link>http://wizardsofsmart.net/patterns/refactoring-with-the-decorator-pattern/</link>
		<comments>http://wizardsofsmart.net/patterns/refactoring-with-the-decorator-pattern/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 17:39:15 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Decorator]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Prism]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Visitor]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/patterns/refactoring-with-the-decorator-pattern/</guid>
		<description><![CDATA[If you are wondering what happened to my flame-war-instigating series on the problems with MVC, you’ll have to continue waiting (as will I for the flame war, apparently). I’ve been busy and haven’t had the time to finish typing and inserting links into the rest of the posts. Such is life. In the meantime, I [...]]]></description>
			<content:encoded><![CDATA[<p>If you are wondering what happened to my flame-war-instigating series on the problems with MVC, you’ll have to continue waiting (as will I for the flame war, apparently). I’ve been busy and haven’t had the time to finish typing and inserting links into the rest of the posts. Such is life.</p>
<p>In the meantime, I hope to start emphasizing the usefulness of developing with patterns. This post was inspired by <a href="http://www.lostechies.com/blogs/sean_chambers/" target="_blank" onclick="urchinTracker('/outgoing/www.lostechies.com/blogs/sean_chambers/?referer=');">Sean Chambers</a> recent <a href="http://www.lostechies.com/blogs/sean_chambers/archive/2009/07/31/31-days-of-refactoring.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.lostechies.com/blogs/sean_chambers/archive/2009/07/31/31-days-of-refactoring.aspx?referer=');">31 Days of Refactoring</a> (<a href="http://www.lostechies.com/media/p/27197/download.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.lostechies.com/media/p/27197/download.aspx?referer=');">e-book</a>) and my recent flub when trying to describe the <a href="http://www.dofactory.com/Patterns/PatternDecorator.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternDecorator.aspx?referer=');">Decorator</a> pattern (ducks, really?).</p>
<h3>Setting the Stage</h3>
<p>On a recent project using WPF and <a href="http://compositewpf.codeplex.com" target="_blank" onclick="urchinTracker('/outgoing/compositewpf.codeplex.com?referer=');">Prism</a>, we’ve built business layer objects to import and export text and Excel files in batches. These batch processes included importing data, transforming the data into something useful, and persisting the transformed data into our database. We needed to communicate progress back to the UI for each of these tasks to keep the user aware of progress, as these tasks can take quite a long time, especially with multiple files. The initial design was raw and messy with lots of code duplication to explicitly create a BackgroundWorker directly within each ViewModel to start the import/export process and listen for events fired directly from our business objects (which essentially follow the <a href="http://www.martinfowler.com/eaaCatalog/transactionScript.html" target="_blank" onclick="urchinTracker('/outgoing/www.martinfowler.com/eaaCatalog/transactionScript.html?referer=');">Transaction Script pattern</a>, more or less).</p>
<p><a href="http://wizardsofsmart.net/author/rookieone" target="_blank">Another co-worker</a>, when he was tasked with building another importer, created a subclass of our base ViewModel class and added all the BackgroundWorker plumbing, then did the same for our base business object class. He also created a ProgressItem : INotifyPropertyChanged type with methods to Start(int items), StartAsIndeterminate, IncrementProgress, EndWithSuccess, and EndWithFailure. He also added a collection wrapper for ProgressItems to allow ease of registering and auto-subscribing (through the AutoNotify method) the owning business object to the PropertyChanged events of the ProgressItems. With this setup, the UI ViewModel could listen to the PropertyChanged events of the business object’s ProgressItems instead of having the business object fire its own events. As you can imagine, this made implementing a batch import / export process immensely easier.</p>
<p>I eventually went back and refactored all of our existing business objects and ViewModels to follow this approach. Not only are both the business objects and ViewModels easier to debug, they are also easier to test since we are no longer firing events, just updating the state of a given ProgressItem. Well, sort of….</p>
<h3>My Turn</h3>
<p>I was recently tasked with creating a new batch import process to pull data from Excel. I started by following the pattern <a href="http://wizardsofsmart.net/author/rookieone" target="_blank">JB</a> set up and had the initial steps of my batch import object ready to go. (I also confess to not having written any tests yet because, to date, we hadn’t figured out how to mock out the SpreadsheetDocument, Rows, etc. from the Open XML SDK we’re using to assist in our import / export tasks. I’ve now solved that problem and retro-fitted in unit tests. I’ll post that solution later.)</p>
<h4>Identifying the Problem</h4>
<p>After taking a step back to look at what I had done, I quickly realized that I was violating <abbr title="Single Responsibility Principle"><a href="http://www.objectmentor.com/resources/articles/srp.pdf" target="_blank" onclick="urchinTracker('/outgoing/www.objectmentor.com/resources/articles/srp.pdf?referer=');">SRP</a></abbr> with the inclusion of the ProgressItems in each step. Some might think that’s not such a big deal; after all, calling start, increment, and end on a single object is only three lines, which doesn’t seem like a lot. However, multiply those three lines by the number of import/export objects and factor in the number of times we forget just one of the them, and you begin to appreciate removing the extraneous bits.</p>
<p>I’m quite certain I noticed this primarily because of my study of functional programming rather than any object-oriented pattern literature I’ve come across. Nevertheless, I considered only OO patterns for the solution simply because the alternative was likely a monad, and that just scares the pants off of most people. (And I like my co-workers.)</p>
<h4>The Contenders</h4>
<p>I needed something that could pull the ProgressItem out of my actual import procedure and allow me to focus that logic purely on the import. The two patterns that came to mind were the <a href="http://www.dofactory.com/Patterns/PatternDecorator.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternDecorator.aspx?referer=');">Decorator</a> and the <a href="http://en.wikipedia.org/wiki/Visitor_pattern" target="_blank" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Visitor_pattern?referer=');">Visitor</a>.</p>
<p>The <a href="http://www.dofactory.com/Patterns/PatternDecorator.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternDecorator.aspx?referer=');">Decorator</a> is generally considered (well, at least by the people I know) the simpler of the two. It wraps and extends an object without changing the underlying object and still providing the same interface. Examples include “decorating” coffee with sugar, cream, etc. and returning an adjusted price for the additional “decorations.”</p>
<p>The <a href="http://en.wikipedia.org/wiki/Visitor_pattern" target="_blank" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Visitor_pattern?referer=');">Visitor</a>, on the other hand, is passed into an object’s <code>void Accept(Visitor visitor)</code> method and provides some resulting side-effect through the visitor itself. Examples include pretty printing, which print a tree-structure with the appropriate indentation, or adding the appropriate tax to an order. Another example for those using the System.Expression namespace would be using the <a href="http://msdn.microsoft.com/en-us/library/bb882521.aspx" target="_blank" onclick="urchinTracker('/outgoing/msdn.microsoft.com/en-us/library/bb882521.aspx?referer=');">ExpressionVisitor</a> to allow the use of <abbr title="Plain Old CLR Objects">POCO</abbr> objects with Entity Framework v1, as <a href="http://wizardsofsmart.net/author/rookieone" target="_blank">JB</a> demonstrated <a href="http://greekfire.codeplex.com/SourceControl/changeset/view/22088#367262" target="_blank" onclick="urchinTracker('/outgoing/greekfire.codeplex.com/SourceControl/changeset/view/22088_367262?referer=');">here</a>. (For those familiar with monads, you’ll likely see some resemblance.)</p>
<p>In this case, I had the following interface:</p>
<script src="http://gist.github.com/217644.js"></script>
<p>For reference, the initial state of a Loader looked something like this, making adjustments to the method signatures for the addition of the ProgressItem, which initially was passed to each method:</p>
<script src="http://gist.github.com/217648.js"></script>
<h4>Enter the Decorator</h4>
<p>Instead of muddying my interface with a <code>void Accept(Visitor vistor)</code> method, I chose to just decorate it. My resulting decorated class looked as follows:</p>
<script src="http://gist.github.com/217649.js"></script>
<p>The resulting base DetailLoader looked like so:</p>
<script src="http://gist.github.com/217651.js"></script>
<p>This made the loader much easier to reason about and test thoroughly, as the ProgressItem is completely removed. I no longer have to remember to add the calls to it or even bother with anything other than loading data. Again, I know some will probably call this an over-engineered example, but as a developer who has had to debug these things when they were initially one method directly on the business object not firing a particular event, the additional abstractions make this a breeze to create, debug, and test. To each his own.</p>
<h4>Testing</h4>
<p>As I mentioned, I figured out a way to test this against the Open XML SDK, but since this is already quite a long post, I’ll postpone that for later. I hope you find this a helpful explanation of how and when to refactor using the <a href="http://www.dofactory.com/Patterns/PatternDecorator.aspx" target="_blank" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternDecorator.aspx?referer=');">Decorator</a> pattern. Please let me know if you have any feedback on the matter.</p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/refactoring-with-the-decorator-pattern/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Domain Driven Design Presentation</title>
		<link>http://wizardsofsmart.net/resources/domain-driven-design-presentation/</link>
		<comments>http://wizardsofsmart.net/resources/domain-driven-design-presentation/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 22:06:08 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[CQS]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Domain Driven Design]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/?p=255</guid>
		<description><![CDATA[Domain Driven Design View more presentations from panesofglass.]]></description>
			<content:encoded><![CDATA[<div style="width:425px;text-align:left" id="__ss_2323669"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/panesofglass/domain-driven-design" title="Domain Driven Design" onclick="urchinTracker('/outgoing/www.slideshare.net/panesofglass/domain-driven-design?referer=');">Domain Driven Design</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=domaindrivendesign-091022165913-phpapp01&#038;rel=0&#038;stripped_title=domain-driven-design" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=domaindrivendesign-091022165913-phpapp01&#038;rel=0&#038;stripped_title=domain-driven-design" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/" onclick="urchinTracker('/outgoing/www.slideshare.net/?referer=');">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/panesofglass" onclick="urchinTracker('/outgoing/www.slideshare.net/panesofglass?referer=');">panesofglass</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/resources/domain-driven-design-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duct Tape AND Quality Together</title>
		<link>http://wizardsofsmart.net/patterns/duct-tape-and-quality-together/</link>
		<comments>http://wizardsofsmart.net/patterns/duct-tape-and-quality-together/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:00:00 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[CQS]]></category>
		<category><![CDATA[DDDD]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Domain Driven Design]]></category>
		<category><![CDATA[Duct Tape Programmer]]></category>
		<category><![CDATA[software craftsmanship]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/patterns/dogs-and-cats-living-together/</guid>
		<description><![CDATA[You’ve probably read Joel’s post on The Duct Tape Programmer and several responses. I did not like Joel’s post at first, as I thought it far too general and easily taken in the context of “always do it this way.” For the record, I have no problems with the duct tape approach when trying something [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_248" class="wp-caption aligncenter" style="width: 310px"><img class="size-full wp-image-248" title="cats-dogs-together-760114-300x225" src="http://wizardsofsmart.net/wp/wp-content/uploads/2009/10/cats-dogs-together-760114-300x225.jpg" alt="Dogs and Cats Living Together" width="300" height="225" /><p class="wp-caption-text">Dogs and Cats Living Together</p></div>
<p>You’ve probably read Joel’s post on <a href="http://www.joelonsoftware.com/items/2009/09/23.html" target="_blank" onclick="urchinTracker('/outgoing/www.joelonsoftware.com/items/2009/09/23.html?referer=');">The Duct Tape Programmer</a> and <a href="http://www.bing.com/search?setmkt=en-US&amp;q=duct+tape+programmer" target="_blank" onclick="urchinTracker('/outgoing/www.bing.com/search?setmkt=en-US_amp_q=duct+tape+programmer&amp;referer=');">several responses</a>. I did not like Joel’s post at first, as I thought it far too general and easily taken in the context of “always do it this way.” For the record, I have no problems with the duct tape approach when trying something out, but I’ve been burned when having to work on someone else’s let-me-try-this project that then became a core, production system. That’s a formula for PAIN. That said, I think you can make a case for using a duct tape approach for some, small parts of your application.</p>
<p>This past week I put together a presentation on <abbr title="Domain Driven Design"><a href="http://www.domaindrivendesign.org" target="_blank" onclick="urchinTracker('/outgoing/www.domaindrivendesign.org?referer=');">DDD</a></abbr> for my office. I included some slides describing <abbr title="Distributed Domain Driven Design">DDDD</abbr> and <abbr title="Command Query Separation">CQS</abbr> as <a href="http://codebetter.com/blogs/gregyoung/" target="_blank" onclick="urchinTracker('/outgoing/codebetter.com/blogs/gregyoung/?referer=');">Greg Young</a> has discussed time and again. While I put together those slides and thinking about Bounded Contexts, I had a sudden realization that even within a single Bounded Context or Module, you could mix duct tape with quality when using CQS.</p>
<p style="text-align: center;"><img class="size-full wp-image-250 aligncenter" title="CQS" src="http://wizardsofsmart.net/wp/wp-content/uploads/2009/10/CQS.jpg" alt="CQS" width="218" height="224" /></p>
<p>If you look at the diagram above, you can easily see where this is possible. If you split your module into read and write contexts, you can focus your greatest efforts for quality on the write side, where your domain lives, and leave the ever-changing read side to duct tape, RAD, etc. for displaying in the UI or reporting. The idea here is that you will often find that what you need to persist doesn’t change very much, but what you are asked to display changes nearly constantly. That’s at least my experience.</p>
<p>Another benefit to this approach is on the sales pipeline. Creating applications consists of these two parts: reading and writing. You may find that clients who have their own internal developers may not want to hire a consultant or contracting firm to build an entire app at their normal rates, but if you can provide them the write side and architecture guidance for the rest of the app, you may be able to sell more projects and keep your people happy working on quality code and quality projects. Of course, that’s just theory at this point.</p>
<p>So is this a case of “mass hysteria”? I don’t know. I like the idea, if not so much for the inclusion of duct tape as the possibility of limiting changes to the core domain models in an application architecture. I’m curious to know what others think or have done.</p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/duct-tape-and-quality-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Problem with the MVC Frameworks &#8211; Introduction</title>
		<link>http://wizardsofsmart.net/patterns/the-problem-with-the-mvc-frameworks-introduction/</link>
		<comments>http://wizardsofsmart.net/patterns/the-problem-with-the-mvc-frameworks-introduction/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 18:03:50 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Front Controller]]></category>
		<category><![CDATA[FubuMVC]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[OpenRasta]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/uncategorized/the-problem-with-the-mvc-frameworks-introduction/</guid>
		<description><![CDATA[The anticipatory buzz about ASP.NET MVC last year has become a loud clanging about the general MVC pattern this year. We’ve got several people talking about the “M” in MVC (K. Scott, Rob &#38; Javier); the “right” way to make ASP.NET MVC work (Jimmy and Seb); and complete alternatives in the form of FubuMVC (Front [...]]]></description>
			<content:encoded><![CDATA[<p>The anticipatory buzz about ASP.NET MVC last year has become a loud clanging about the general MVC pattern this year. We’ve got several people talking about the “M” in MVC (<a href="http://odetocode.com/blogs/scott/archive/2009/03/30/12714.aspx" onclick="urchinTracker('/outgoing/odetocode.com/blogs/scott/archive/2009/03/30/12714.aspx?referer=');">K. Scott</a>, <a href="http://blog.wekeroad.com/subsonic/putting-the-ldquo-m-rdquo-back-in-mvc/" onclick="urchinTracker('/outgoing/blog.wekeroad.com/subsonic/putting-the-ldquo-m-rdquo-back-in-mvc/?referer=');">Rob</a> &amp; <a href="http://herdingcode.com/?p=177" onclick="urchinTracker('/outgoing/herdingcode.com/?p=177&amp;referer=');">Javier</a>); the “right” way to make ASP.NET MVC work (<a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/06/29/how-we-do-mvc-view-models.aspx" onclick="urchinTracker('/outgoing/www.lostechies.com/blogs/jimmy_bogard/archive/2009/06/29/how-we-do-mvc-view-models.aspx?referer=');">Jimmy</a> and <a href="http://serialseb.blogspot.com/2009/05/my-mvc-best-practices-talk.html" onclick="urchinTracker('/outgoing/serialseb.blogspot.com/2009/05/my-mvc-best-practices-talk.html?referer=');">Seb</a>); and complete alternatives in the form of <a href="http://fubumvc.pbworks.com/" onclick="urchinTracker('/outgoing/fubumvc.pbworks.com/?referer=');">FubuMVC</a> (<a href="http://www.lostechies.com/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx" onclick="urchinTracker('/outgoing/www.lostechies.com/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx?referer=');">Front Controller</a>), <a href="http://bistroframework.org/index.php?title=Bistro_Framework_Home" onclick="urchinTracker('/outgoing/bistroframework.org/index.php?title=Bistro_Framework_Home&amp;referer=');">Bistro</a> (Alex), and—related from a web development perspective if not MVC—<a href="http://openrasta.com/" onclick="urchinTracker('/outgoing/openrasta.com/?referer=');">OpenRasta</a> (<a href="http://serialseb.blogspot.com/" onclick="urchinTracker('/outgoing/serialseb.blogspot.com/?referer=');">Seb</a>). Why do we have all this complexity or all these options? I submit to you that the problems in the pattern as it relates to web design and the complex structures designed to handle it are a result of mixed metaphors; i.e., the web is not a UI but a service platform.</p>
<p>Before moving on, let me just say that by no means am I advocating WebForms or other, similar frameworks. Such things are atrocities that should never have been committed upon this earth. (Okay, I exaggerate a bit, but hopefully you get my point that while I’m about to rag on MVC, some of these other things are worse.)</p>
<p>As I wrote, this thing became far too long for a single post, so I’m breaking it up into sections. I also need to find and tie in the discussion I had with <a href="http://wizardsofsmart.net/author/rookieone">JB</a> about this very thing. I like how that discussion went, although it was based upon other discussions similar to those in the following posts:</p>
<p>1. <a href="http://wizardsofsmart.net/patterns/a-history-of-violence-against-html/">A History of Violence against HTML</a><br />
2. New Names for Old Things<br />
3. Serve me up some of that good ole Appl(ication)e Pie<br />
4. The Web is a Service Bus<br />
5. The Gauntlet</p>
<p>So stay tuned. There’s more to come. <img src='http://wizardsofsmart.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/the-problem-with-the-mvc-frameworks-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prism Digg/Twitter Search Client on Channel 9</title>
		<link>http://wizardsofsmart.net/news/prism-diggtwitter-search-client-on-channel-9/</link>
		<comments>http://wizardsofsmart.net/news/prism-diggtwitter-search-client-on-channel-9/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 19:21:01 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[CompositeWpf]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Patterns & Practices]]></category>
		<category><![CDATA[Prism]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/news/prism-diggtwitter-search-client-on-channel-9</guid>
		<description><![CDATA[The Microsoft Patterns &#38; Practices team have posted links to the Channel 9 Prism digg/twitter search application on their CodePlex site. Check it out: patterns &#38; practices: Composite WPF and Silverlight &#8211; Home]]></description>
			<content:encoded><![CDATA[<p>The Microsoft Patterns &amp; Practices team have posted links to the Channel 9 Prism digg/twitter search application on their CodePlex site. Check it out: <a href="http://compositewpf.codeplex.com/Wiki/View.aspx?title=Learn%20Prism" onclick="urchinTracker('/outgoing/compositewpf.codeplex.com/Wiki/View.aspx?title=Learn_20Prism&amp;referer=');">patterns &amp; practices: Composite WPF and Silverlight &#8211; Home</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/news/prism-diggtwitter-search-client-on-channel-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ViewModel Futures</title>
		<link>http://wizardsofsmart.net/patterns/viewmodel-futures/</link>
		<comments>http://wizardsofsmart.net/patterns/viewmodel-futures/#comments</comments>
		<pubDate>Wed, 13 May 2009 04:10:49 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[ViewModel]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/patterns/viewmodel-futures</guid>
		<description><![CDATA[Glenn Block asked two questions on Twitter tonight that were too good to pass up. First, do you want better tooling, more testable data binding, or a ViewModel base class? I agree with whoever said patterns exist to make up for faults in a language; however, in this case, I think I would choose enhancements [...]]]></description>
			<content:encoded><![CDATA[<p>Glenn Block asked two questions on Twitter tonight that were too good to pass up. First, do you want better tooling, more testable data binding, or a ViewModel base class? I agree with whoever said patterns exist to make up for faults in a language; however, in this case, I think I would choose enhancements to data binding. It&#8217;s a little too magical, imho.</p>
<p>I would like to see a ViewModel base eventually, though, as that would be one less thing to wire up myself, and it hopefully silence all the people complaining about the lack of a model in MVC. (Yes, I am thinking the backend models should be sharable among WPF, Silverlight, and MVC.)</p>
<p>Glenn&#8217;s second question related to tv target audience. I am always a fan of simple explocicity, to borrow a word from JB. I think that&#8217;s what the experts use. Also, I don&#8217;t know many who want to me mediocre some day, so going for the best and letting it trickle down is a great idea.</p>
<p>Just my $.02.</p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/viewmodel-futures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YAGNI&#8211;Whose Definition of Simple?</title>
		<link>http://wizardsofsmart.net/patterns/yagni-whose-definition-of-simple/</link>
		<comments>http://wizardsofsmart.net/patterns/yagni-whose-definition-of-simple/#comments</comments>
		<pubDate>Tue, 12 May 2009 13:00:52 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[SOLID]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[YAGNI]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/patterns/yagni-whose-definition-of-simple</guid>
		<description><![CDATA[I have read a lot about YAGNI lately, especially regarding TDD. The thing that keeps bugging me is the definition of &#8220;simple.&#8221; Who defines simple? For instance, wouldn&#8217;t static methods be simpler than building objects? You could then write more functionally. Or is that not simpler to you? If you follow command-query separation, wouldn&#8217;t building [...]]]></description>
			<content:encoded><![CDATA[<p>I have read a lot about <a class="zem_slink" title="You Ain't Gonna Need It" rel="wikipedia" href="http://en.wikipedia.org/wiki/You_Ain%27t_Gonna_Need_It" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/You_Ain_27t_Gonna_Need_It?referer=');">YAGNI</a> lately, especially regarding <a class="zem_slink" title="Test-driven development" rel="wikipedia" href="http://en.wikipedia.org/wiki/Test-driven_development" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Test-driven_development?referer=');">TDD</a>. The thing that keeps bugging me is the definition of &#8220;simple.&#8221; Who defines simple? For instance, wouldn&#8217;t static methods be simpler than building objects? You could then write more functionally. Or is that not simpler to you? If you follow <a class="zem_slink" title="Command-query separation" rel="wikipedia" href="http://en.wikipedia.org/wiki/Command-query_separation" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Command-query_separation?referer=');">command-query separation</a>, wouldn&#8217;t building everything as either pure functions or commands be simplest? JB and I have found this set of patterns immensely easy to create and test of late, especially in comparison to the ever-increasing-in-complexity procedural/OO code in place before.</p>
<p>So I guess my question is this: Is it really so bad to start with some basic patterns that will let you <a class="zem_slink" title="Code refactoring" rel="wikipedia" href="http://en.wikipedia.org/wiki/Code_refactoring" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Code_refactoring?referer=');">refactor</a> more easily? I think the desire to make things as simple as possible&#8211;especially when you know you will need it&#8211;can be a waste of time and a good way of getting bad code into your source.</p>
<p>I know I will hear it from the Agile community that I just don&#8217;t get it, but I think I do. I really like starting simple and keeping things in nice, bite-sized testable chunks. And yes, I&#8217;m still learning. However, without a consistent and meaningful definition of &#8220;simple,&#8221; we&#8217;re likely to end up with a follow-up movement of making things complex for the sake of extensibility again.</p>
<p>So what do you think: is CQS too complex a starting point, or is it a nice, &#8220;simple,&#8221; and testable approach for YAGNI?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=933e7d8e-8c97-4679-ad3a-421e33908d4a" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/yagni-whose-definition-of-simple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Correctly Naming Patterns</title>
		<link>http://wizardsofsmart.net/patterns/jb-and-i-were-discussing-some-of-the-pat/</link>
		<comments>http://wizardsofsmart.net/patterns/jb-and-i-were-discussing-some-of-the-pat/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 22:00:29 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Builder]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Strategy]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/uncategorized/jb-and-i-were-discussing-some-of-the-pat</guid>
		<description><![CDATA[JB and I were discussing some of the patterns we were using on our current project today while working on merging some of our disparate (but completely related) code. I had created several classes named XyzBuilder with the intention of actually following the Builder pattern. My final classes are really just Strategies, but I never [...]]]></description>
			<content:encoded><![CDATA[<p>JB and I were discussing some of the patterns we were using on our current project today while working on merging some of our disparate (but completely related) code. I had created several classes named XyzBuilder with the intention of actually following the <a href="http://www.dofactory.com/Patterns/PatternBuilder.aspx" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternBuilder.aspx?referer=');">Builder pattern</a>. My final classes are really just <a href="http://www.dofactory.com/Patterns/PatternStrategy.aspx" onclick="urchinTracker('/outgoing/www.dofactory.com/Patterns/PatternStrategy.aspx?referer=');">Strategies</a>, but I never changed the name (though I&#8217;ve meant to do so).</p>
<p>This hasn&#8217;t lead to confusion, however, as (a) the &#8220;builder&#8221; is in fact &#8220;building&#8221; an object for me so the name is still meaningful and (b) most of my team members aren&#8217;t that familiar with using patterns on a daily basis (or they at least say they don&#8217;t). I&#8217;ve a thought, though, that objects with pattern-ish names should be renamed to either non-pattern names or the name of the pattern they use.</p>
<p>Should the name match the pattern or does it really matter?</p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/patterns/jb-and-i-were-discussing-some-of-the-pat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Oxite Indeed</title>
		<link>http://wizardsofsmart.net/uncategorized/another-oxite-indeed/</link>
		<comments>http://wizardsofsmart.net/uncategorized/another-oxite-indeed/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:52:08 +0000</pubDate>
		<dc:creator>panesofglass</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[App Arch]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Guidance]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Patterns & Practices]]></category>

		<guid isPermaLink="false">http://wizardsofsmart.net/?p=110</guid>
		<description><![CDATA[Another Oxite, indeed. My Google Reader reported a flood of activity in the AppArch CodePlex wiki, the majority of which was updated patterns pages with &#8220;BETA &#8211; Published for Community Feedback. This page is a wiki.  Please provide your feedback in the comments below,&#8221; at the top. The Application Architecture Guide, v2 is now back [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Another Oxite?" href="http://wizardsofsmart.net/news/another-oxite">Another Oxite</a>, indeed. My Google Reader reported a flood of activity in the <a title="App Arch Application Patterns" href="http://www.codeplex.com/AppArch/Wiki/View.aspx?title=Application%20Patterns" onclick="urchinTracker('/outgoing/www.codeplex.com/AppArch/Wiki/View.aspx?title=Application_20Patterns&amp;referer=');">AppArch CodePlex wiki</a>, the majority of which was updated patterns pages with &#8220;BETA &#8211; Published for Community Feedback. This page is a wiki.  Please provide your feedback in the comments below,&#8221; at the top. The Application Architecture Guide, v2 is now back in beta status after the flood of community feedback following its <a title="App Arch Guide 2.0 Release" href="http://blogs.msdn.com/jmeier/archive/2008/12/16/application-architecture-guide-2-0-final-release.aspx" onclick="urchinTracker('/outgoing/blogs.msdn.com/jmeier/archive/2008/12/16/application-architecture-guide-2-0-final-release.aspx?referer=');">December 2008 &#8220;final&#8221; release</a>.</p>
<p>I&#8217;m glad to see Microsoft respond to the community. I find great hope in Microsoft&#8217;s future in their willingness to listen and respond. If only they would do so sooner rather than later, they would have a <em>much</em> better reputation with the community. Nevertheless, I&#8217;m pleased with their desire to dialogue with the community to improve their guidance.</p>
<p>Now, if you are an architect or developer with experience in the areas for which Microsoft is offering guidance, speak up. Help provide the response for which Microsoft is asking. This is a great opportunity for us to bridge the relationship we have with the team at Microsoft providing the tools we use daily.</p>
]]></content:encoded>
			<wfw:commentRss>http://wizardsofsmart.net/uncategorized/another-oxite-indeed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
