<?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: PTOM: The Decorator Pattern</title>
	<atom:link href="http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Thu, 13 Sep 2012 07:11:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: gunasekaran sambandhan</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-641</link>
		<dc:creator>gunasekaran sambandhan</dc:creator>
		<pubDate>Thu, 13 Sep 2012 07:11:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-641</guid>
		<description>@ guna

Great Article!
Very clean explaination of Decorator pattern. That forcing me to ask one question..
Q: It seems here this concept is violating one of the SOLID priniciple (
FUNCTIONS THAT USE … REFERENCES TO BASE CLASSES MUST BE ABLE TO USE OBJECTS OF DERIVED CLASSES  WITHOUT KNOWING IT. - Liskov Substitution Principle)

please correct me if i am wrong..</description>
		<content:encoded><![CDATA[<p>@ guna</p>
<p>Great Article!<br />
Very clean explaination of Decorator pattern. That forcing me to ask one question..<br />
Q: It seems here this concept is violating one of the SOLID priniciple (<br />
FUNCTIONS THAT USE … REFERENCES TO BASE CLASSES MUST BE ABLE TO USE OBJECTS OF DERIVED CLASSES  WITHOUT KNOWING IT. &#8211; Liskov Substitution Principle)</p>
<p>please correct me if i am wrong..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-279</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Tue, 18 Nov 2008 22:18:50 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-279</guid>
		<description>@ Brad Mead

Not really, the Head First Design Patterns book used the coffee example to illustrate the Decorator pattern.

@ schambers

You could have saved yourself the effort of writing this (otherwise good) post and just linked straight to the freely available chapter 3 of DHDP:

http://oreilly.com/catalog/hfdesignpat/chapter/ch03.pdf

</description>
		<content:encoded><![CDATA[<p>@ Brad Mead</p>
<p>Not really, the Head First Design Patterns book used the coffee example to illustrate the Decorator pattern.</p>
<p>@ schambers</p>
<p>You could have saved yourself the effort of writing this (otherwise good) post and just linked straight to the freely available chapter 3 of DHDP:</p>
<p><a href="http://oreilly.com/catalog/hfdesignpat/chapter/ch03.pdf" rel="nofollow">http://oreilly.com/catalog/hfdesignpat/chapter/ch03.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: schambers</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-278</link>
		<dc:creator>schambers</dc:creator>
		<pubDate>Tue, 18 Nov 2008 08:29:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-278</guid>
		<description>@Pat

I suppose if your graph is that deep, then the easiest way to accomplish that is still with ABC&#039;s for the base decorator.

This is a good question though. While I have not had decorators that were that complex heirarchy wise, I would be interested if anyone else has come across a situation like that.</description>
		<content:encoded><![CDATA[<p>@Pat</p>
<p>I suppose if your graph is that deep, then the easiest way to accomplish that is still with ABC&#8217;s for the base decorator.</p>
<p>This is a good question though. While I have not had decorators that were that complex heirarchy wise, I would be interested if anyone else has come across a situation like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-277</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Mon, 17 Nov 2008 19:50:38 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-277</guid>
		<description>Suppose your object model was a little more deep than just ICoffee:

ICoffee &lt;- ILatte &lt;- IX &lt;- IY &lt;- IZ

Whip cream, chocolate, etc. could only be added to IZ and not ICoffee directly. The decorator provides dynamic extensibility which is nice, but now something that decorates IZ has to also wrap all members of ICoffee, ILatte, IX, and IY.

If any aspect of that hierarchy changes, your decorator has to be updated. Does this present a maintenance issue? Are their ways to work around this?</description>
		<content:encoded><![CDATA[<p>Suppose your object model was a little more deep than just ICoffee:</p>
<p>ICoffee <- ILatte <- IX <- IY <- IZ</p>
<p>Whip cream, chocolate, etc. could only be added to IZ and not ICoffee directly. The decorator provides dynamic extensibility which is nice, but now something that decorates IZ has to also wrap all members of ICoffee, ILatte, IX, and IY.</p>
<p>If any aspect of that hierarchy changes, your decorator has to be updated. Does this present a maintenance issue? Are their ways to work around this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-276</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 17 Nov 2008 19:46:13 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-276</guid>
		<description>Great post! very clear example, I posted about an example of employing decorator to add extra behaviour a while back http://journalofasoftwaredev.wordpress.com/2008/03/21/multi-search-engine-enhancement-using-design-patterns/ be interesting to see what you think :)</description>
		<content:encoded><![CDATA[<p>Great post! very clear example, I posted about an example of employing decorator to add extra behaviour a while back <a href="http://journalofasoftwaredev.wordpress.com/2008/03/21/multi-search-engine-enhancement-using-design-patterns/" rel="nofollow">http://journalofasoftwaredev.wordpress.com/2008/03/21/multi-search-engine-enhancement-using-design-patterns/</a> be interesting to see what you think <img src='http://lostechies.com/seanchambers/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Mead</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-275</link>
		<dc:creator>Brad Mead</dc:creator>
		<pubDate>Mon, 17 Nov 2008 17:09:03 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-275</guid>
		<description>Good example... Thanks for a novel context (Coffee) in which to couch the understanding.</description>
		<content:encoded><![CDATA[<p>Good example&#8230; Thanks for a novel context (Coffee) in which to couch the understanding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: schambers</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-274</link>
		<dc:creator>schambers</dc:creator>
		<pubDate>Mon, 17 Nov 2008 13:38:25 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-274</guid>
		<description>@Steve

I suppose you could say that is a concern, but an acceptable concern. You would need to contain the additional logic somewhere. One class per behavior would be acceptable in my eyes.</description>
		<content:encoded><![CDATA[<p>@Steve</p>
<p>I suppose you could say that is a concern, but an acceptable concern. You would need to contain the additional logic somewhere. One class per behavior would be acceptable in my eyes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-273</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 17 Nov 2008 11:56:37 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-273</guid>
		<description>Excellent post - thank you for explaining the decorator pattern.

Question: is there concern of an &#039;explosion of decorator classes&#039; ?</description>
		<content:encoded><![CDATA[<p>Excellent post &#8211; thank you for explaining the decorator pattern.</p>
<p>Question: is there concern of an &#8216;explosion of decorator classes&#8217; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: schambers</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-272</link>
		<dc:creator>schambers</dc:creator>
		<pubDate>Mon, 17 Nov 2008 11:56:27 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-272</guid>
		<description>@Dave
The decorator is similar in behavior to the adapter pattern. The main difference being the intent of the adapter is to change one interface into another in order to be able to work with a system that you couldn&#039;t normally work with.

While the structure is similar, the intent is different.

Thanks for the kind words!</description>
		<content:encoded><![CDATA[<p>@Dave<br />
The decorator is similar in behavior to the adapter pattern. The main difference being the intent of the adapter is to change one interface into another in order to be able to work with a system that you couldn&#8217;t normally work with.</p>
<p>While the structure is similar, the intent is different.</p>
<p>Thanks for the kind words!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave the Ninja</title>
		<link>http://lostechies.com/seanchambers/2008/11/17/ptom-the-decorator-pattern/#comment-271</link>
		<dc:creator>Dave the Ninja</dc:creator>
		<pubDate>Mon, 17 Nov 2008 05:34:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2008/11/16/ptom-the-decorator-pattern.aspx#comment-271</guid>
		<description>I always think the decorator pattern is very similar to the Adapter pattern.

Both very very useful patterns.

Great article!

Dave the Ninja

</description>
		<content:encoded><![CDATA[<p>I always think the decorator pattern is very similar to the Adapter pattern.</p>
<p>Both very very useful patterns.</p>
<p>Great article!</p>
<p>Dave the Ninja</p>
]]></content:encoded>
	</item>
</channel>
</rss>
