<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Patterns I Hate #2: Template Method</title>
	<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/</link>
	<description>Alex Miller's technical blog</description>
	<pubDate>Thu, 28 Aug 2008 03:19:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Passion is like genius; a miracle. - Template Method Pattern and Virtuality in C++</title>
		<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-49449</link>
		<pubDate>Tue, 20 May 2008 16:57:10 +0000</pubDate>
		<guid>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-49449</guid>
					<description>[...] 2. Then, consider alternatives like strategy, factory or callback. http://tech.puredanger.com/2007/07/03/pattern-hate-template/    Posted 21 May 2008 / C_CPlusPlus / [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] 2. Then, consider alternatives like strategy, factory or callback. <a href='http://tech.puredanger.com/2007/07/03/pattern-hate-template/' rel='nofollow'>http://tech.puredanger.com/2007/07/03/pattern-hate-template/</a>    Posted 21 May 2008 / C_CPlusPlus / [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: englishteeth.co.uk &#187; Template Pattern: Friend or Foe?</title>
		<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-44108</link>
		<pubDate>Wed, 30 Apr 2008 08:58:21 +0000</pubDate>
		<guid>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-44108</guid>
					<description>[...] Having come across Alex Miller&amp;#8217;s blog, I&amp;#8217;ve enjoyed a number of his posts. However, whereas I am definitely in-line with his dislike of the Singleton pattern, I couldn&amp;#8217;t agree with his conclusions on the use of the template pattern. 1. Communicates intent poorly - The template method pattern is often used as part of the effective API in some mini-framework where the framework user is expected to subclass the template class. My experience has been that it is difficult to communicate that usage intent to users of the framework. Often the template class has some non-private methods that are exposed for use by the framework but are not intended to be used by the framework user, some that are intended to be overridden, and some that are both. Also, you may need to say whether the super’s version of the method can, should, or must be called. Communicating all that clearly is impossible in an API of any complexity. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Having come across Alex Miller&#8217;s blog, I&#8217;ve enjoyed a number of his posts. However, whereas I am definitely in-line with his dislike of the Singleton pattern, I couldn&#8217;t agree with his conclusions on the use of the template pattern. 1. Communicates intent poorly - The template method pattern is often used as part of the effective API in some mini-framework where the framework user is expected to subclass the template class. My experience has been that it is difficult to communicate that usage intent to users of the framework. Often the template class has some non-private methods that are exposed for use by the framework but are not intended to be used by the framework user, some that are intended to be overridden, and some that are both. Also, you may need to say whether the super’s version of the method can, should, or must be called. Communicating all that clearly is impossible in an API of any complexity. [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Alex</title>
		<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34413</link>
		<pubDate>Tue, 25 Mar 2008 03:12:11 +0000</pubDate>
		<guid>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34413</guid>
					<description>I don't think this would be considered a template method pattern.  Usually a template method is described as an algorithm with pluggable steps.  Certainly abstract classes are useful.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think this would be considered a template method pattern.  Usually a template method is described as an algorithm with pluggable steps.  Certainly abstract classes are useful.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: I-Love-Patterns</title>
		<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34195</link>
		<pubDate>Sun, 23 Mar 2008 18:45:23 +0000</pubDate>
		<guid>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34195</guid>
					<description>Little amendment to my todays post, as this just came to my mind about 5 minutes ago: Look at java collection api, to be precise to the AbstractXYZ classes. Read the header, for instance of AbstractList, which tells you about how simple it could be to implement a List...I think this is a good example of template-method pattern.</description>
		<content:encoded><![CDATA[<p>Little amendment to my todays post, as this just came to my mind about 5 minutes ago: Look at java collection api, to be precise to the AbstractXYZ classes. Read the header, for instance of AbstractList, which tells you about how simple it could be to implement a List&#8230;I think this is a good example of template-method pattern.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: I-Love-Patterns</title>
		<link>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34150</link>
		<pubDate>Sun, 23 Mar 2008 13:36:43 +0000</pubDate>
		<guid>http://tech.puredanger.com/2007/07/03/pattern-hate-template/#comment-34150</guid>
					<description>Just an amendment to my recent post, because it came to my mind about 5 minutes ago: A rather good real life example of template-pattern is the collection API, to be precise the AbstractXYZ impls, which I would say apply template method in a rather benefiting way: Take a look what  http://java.sun.com/j2se/1.4.2/docs/api/java/util/AbstractList.html
states in it javadoc header about implementation requirements for immutable or immutable lists.</description>
		<content:encoded><![CDATA[<p>Just an amendment to my recent post, because it came to my mind about 5 minutes ago: A rather good real life example of template-pattern is the collection API, to be precise the AbstractXYZ impls, which I would say apply template method in a rather benefiting way: Take a look what  <a href='http://java.sun.com/j2se/1.4.2/docs/api/java/util/AbstractList.html' rel='nofollow'>http://java.sun.com/j2se/1.4.2/docs/api/java/util/AbstractList.html</a><br />
states in it javadoc header about implementation requirements for immutable or immutable lists.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
