CSC/ECE 517 Fall 2012/ch2b 2w49 ps
Template Method Pattern - Directory of Sites
Introduction
This page provides a directory of sites that can be used as reference to learn about Template Method Pattern in Object oriented design
Directory of Sites
1. Template method pattern (Wikipedia)
http://en.wikipedia.org/wiki/Template_method_pattern
This is the first reference site that everyone uses to learn about an established fact. The site offers a very good introduction to template method pattern and is well organized. It also provides an example for the usage of template pattern in Java. The site also explains briefly why we need to use template pattern. It also explains the concept with the help of UML diagrams in a simple way.
Drawbacks
The site does not compare this pattern with other design patterns. If we need to compare we have to read through other wikis on design patterns and should understand the differences by self.
2. Template Method (oodesign.com)
http://www.oodesign.com/template-method-pattern.html
This is a very good site to learn about design patterns in general and provides a good explanation for Template Method Patterns also. The site is very informative and detailed. The organization of the content is very good and is done in a simple manner. The site also provides specific problems and implementations. The site also provides a brief view on the comparison between template method pattern and the most closest, strategy pattern. There is a section which summarizes the hot points to be noted while using Template Method Pattern. The site also provides multiple examples and UML diagrams which make the content easy to comprehend.
3. Template Method Design Pattern (dofactory.com)
http://www.dofactory.com/Patterns/PatternTemplate.aspx
The site is a very good reference when it comes to examples of using template method pattern. The description about the pattern in words is very limited. But the examples provide a very easy way to understand the pattern. The major advantage is, it gives the usage of template pattern in multiple OO languages like Java, C# and a real world example.
Drawbacks
1. The description does not cover all the necessary details about the pattern 2. Comparison with other patterns are not present 3. Does not justify the requirement of using template pattern
4. Patterns I Hate #2: Template Method (Blog)
http://tech.puredanger.com/2007/07/03/pattern-hate-template/
This is not a site to understand the template method pattern. Rather, this site is very informative in understanding the disadvantages of using template method pattern. Before referring this site, you should be aware of the template method pattern. The site provides alternatives to the use of template pattern.
Drawbacks
1. No reference to the actual description about template method pattern. 2. Examples are difficult to understand with the limited explanation
5. Similarities/Differences between template method pattern and strategy pattern? (Stack overflow)
http://stackoverflow.com/questions/10376024/is-there-similarities-between-template-method-pattern-and-strategy-pattern
This link is very informative in understanding the differences between the template pattern and the strategy pattern. The site provides several posts from many people which could be a good way to get different views about template pattern and other design patterns. It also makes use of an example to understand the differences between template design pattern and strategy pattern.
Drawbacks
1. Not a reference page to learn about template design pattern. It can only provide comparisons.
6. Where should we use Template Method - pattern? (Stack Overflow)
http://stackoverflow.com/questions/1553856/where-should-we-use-template-method-pattern
This site provides a good insight towards understanding when the Template method pattern should be used. The examples provided can give a good idea about the usage of template method pattern. This is not a site that can be used to learn template method pattern. It assumes prior knowledge about design patterns in general.
7. Template method design patterns in Java/J2EE (Javabeat.com)
http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/
The Site gives a crisp definition of the pattern and there after gives an example as to how one can implement the pattern Template. It supports the example with a code in java.
8. Template Method in Java (SourceMaking.com)
http://sourcemaking.com/design_patterns/template_method/java/2
The site describes the pattern in the form of summary points and supports the same with a code in java that merely explains the usage of the pattern.
9. Design Patterns Uncovered: The Template Method Pattern (DZone)
http://java.dzone.com/articles/design-patterns-template-method
The site introduces the pattern with a real world example. It subsequently gives a clear definition of the pattern. It also provides a diagrammatic representation of the pattern in the form of a UML diagram. It elaborates the on Abstract and concrete classes required to implement the pattern. It further explains when we one should use the pattern supporting it with an example. The article ends with a java code implementation for an abstract compiler class that is varyingly used for different compiler classes.
10. Template Method Design Pattern (BlackWasp)
http://www.blackwasp.co.uk/TemplateMethod.aspx
The site gives a brief overview of the pattern and also talks about the difference between a very similar strategy pattern and template pattern. It also provides arguments in support of the pattern and its advantages. An example of algorithms with similar steps is presented to explain the concept.
11. Template Method Design Patterns (SourceMaking)
http://sourcemaking.com/design_patterns/template_method
The site introduces the pattern by providing the reader with the reason as to why we need the pattern. Thereafter a discussion is presented that explains the concept of hooks and placeholders. The discussion also presents a diagrammatic representation of the real world scenario.
12. Template method Pattern – Design Patterns in Java/J2EE (JavaBeat)
http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/
The site provides the definition of the pattern and puts across an example of using the pattern in loading and parsing data in oracle. It also suffices the explanation with 6 other real software problems where template pattern can be employed like ‘flexible extendable generalized specialized user interfaces’, ‘ASP.net page life cycle’, ‘code generators’, ‘XML parsers’.
Summary Table
The table provides the comparison between the 12 of the websites that have useful information regarding Template Method Pattern. The websites are rated on certain parameters (shown in table) with the maximum rating being (☆☆☆☆) and the minimum ( nil ). The numeric count of the site is the same as represented above.
Characteristic | Site 1 | Site 2 | Site 3 | Site 4 | Site 5 | Site 6 | Site 7 | Site 8 | Site 9 | Site 10 | Site 11 | Site 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Clarity of content & fullness | ☆☆☆☆ | ☆☆☆☆ | ☆☆ | ☆ | ☆ | ☆☆ | ☆☆ | ☆☆☆☆ | ☆☆ | ☆☆☆ | ☆☆☆ | |
Most suitable examples(code) | ☆☆ | ☆☆☆ | ☆☆☆ | ☆☆ | ☆☆☆ | ☆☆ | ☆☆☆ | ☆☆☆☆ | ☆☆☆ | ☆☆☆ | ☆☆ | ☆☆☆☆ |
Comparison with closely related patterns | ☆☆ | ☆☆☆ | ||||||||||
Structure of the represented information | ☆☆☆☆ | ☆☆☆☆ | ☆☆ | ☆☆ | ☆ | ☆ | ☆☆ | ☆☆ | ☆☆☆ | ☆☆ | ☆☆☆ | ☆☆ |
Real World usages | ☆☆ | ☆☆☆☆ | ☆☆☆ | ☆☆☆ | ☆☆ | ☆☆☆ | ☆☆☆ | ☆☆☆☆ | ||||
Disadvantages of the pattern | ☆☆☆☆ | ☆☆☆ | ☆☆ |