<?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: The Strategy Pattern</title>
	<atom:link href="http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/</link>
	<description></description>
	<lastBuildDate>Sun, 29 Jan 2012 03:53:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Zephyr</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-652</link>
		<dc:creator>Zephyr</dc:creator>
		<pubDate>Wed, 19 Oct 2011 16:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-652</guid>
		<description>To add to my previous comment: Is there a way to determine the strategy without requiring a switch? Would it be possible to say: &quot;This value was passed in, now who wants to deal with it?&quot;</description>
		<content:encoded><![CDATA[<p>To add to my previous comment: Is there a way to determine the strategy without requiring a switch? Would it be possible to say: &#8220;This value was passed in, now who wants to deal with it?&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zephyr</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-651</link>
		<dc:creator>Zephyr</dc:creator>
		<pubDate>Wed, 19 Oct 2011 16:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-651</guid>
		<description>Thank you for this article. It helped me rethink a big switch statement I have. However, it still appears you would need a switch statement to handle the choice of strategy. Correct me if I am wrong (please do, because I would like a better way), but in the situation you mentioned, you would need to change the strategy depending on salary and this would require a switch or check of some sort.</description>
		<content:encoded><![CDATA[<p>Thank you for this article. It helped me rethink a big switch statement I have. However, it still appears you would need a switch statement to handle the choice of strategy. Correct me if I am wrong (please do, because I would like a better way), but in the situation you mentioned, you would need to change the strategy depending on salary and this would require a switch or check of some sort.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-346</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 01 May 2010 07:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-346</guid>
		<description>Amazing post, you&#039;ve helped me understand the strategy!</description>
		<content:encoded><![CDATA[<p>Amazing post, you&#8217;ve helped me understand the strategy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Denning</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-249</link>
		<dc:creator>Geoff Denning</dc:creator>
		<pubDate>Sat, 29 Aug 2009 18:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-249</guid>
		<description>Thanks for this great example of the Strategy pattern, this helped me to understand this pattern much better than any other reference I&#039;ve found online so far.

I just wanted to point out a few minor mistakes in the code, which had me a bit confused at first:

* In the AmountObject abstract class, setAmountStrategy should return void.
* The AmountBehavior interface should be named AmountStrategy.
* The AmountStrategyImpl class should extend AmountObject (not AmountStrategy).
* The AmountStrategyExample class should not extend anything.
* In the AmountStrategyExample class, the amountStrategy.getAmount(); line should actually say amountStrategy.calculateAmount();</description>
		<content:encoded><![CDATA[<p>Thanks for this great example of the Strategy pattern, this helped me to understand this pattern much better than any other reference I&#8217;ve found online so far.</p>
<p>I just wanted to point out a few minor mistakes in the code, which had me a bit confused at first:</p>
<p>* In the AmountObject abstract class, setAmountStrategy should return void.<br />
* The AmountBehavior interface should be named AmountStrategy.<br />
* The AmountStrategyImpl class should extend AmountObject (not AmountStrategy).<br />
* The AmountStrategyExample class should not extend anything.<br />
* In the AmountStrategyExample class, the amountStrategy.getAmount(); line should actually say amountStrategy.calculateAmount();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgio Sironi</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-220</link>
		<dc:creator>Giorgio Sironi</dc:creator>
		<pubDate>Mon, 11 May 2009 19:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-220</guid>
		<description>I reached this post from a link on a new one, but it seems that there is some problems with naming. The AmountStrategy class is not implemented anywhere (maybe it has been renamed in AmountBehaviour).</description>
		<content:encoded><![CDATA[<p>I reached this post from a link on a new one, but it seems that there is some problems with naming. The AmountStrategy class is not implemented anywhere (maybe it has been renamed in AmountBehaviour).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carsten</title>
		<link>http://codeofdoom.com/wordpress/2008/04/18/the-strategy-pattern/comment-page-1/#comment-211</link>
		<dc:creator>Carsten</dc:creator>
		<pubDate>Mon, 11 May 2009 12:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=3#comment-211</guid>
		<description>This is exactly what I stumbled upon a few days ago. Err, what I whish I had found. But really I found a couple of if and switch statements that crumple up lots of functionality into a single method... :-(</description>
		<content:encoded><![CDATA[<p>This is exactly what I stumbled upon a few days ago. Err, what I whish I had found. But really I found a couple of if and switch statements that crumple up lots of functionality into a single method&#8230; <img src='http://codeofdoom.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

