Everything About ___
Live briefing

Everything about Template method pattern

Behavioral design pattern in object-oriented programming

In object-oriented programming, the template method is one of the behavioral design patterns identified by Gamma et al. in the book Design Patterns. The template method is a method in a superclass, usually an abstract superclass, and defines the skeleton of an operation in terms of a number of high-level steps. These steps are themselves implemented by additional helper methods in the same class as the template method. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Template method patternA 5-minute orientation
  2. Pick up a classic book: Technical CommunicationThe most-reprinted book on the subject
  3. Read the landmark paper: Automated refactoring of super-class method invocations to the Template Method design patternCited 22 times
  4. Go sideways: Call superA closely related topic
  5. Go sideways: Method (computer programming)A closely related topic

📖 Definitions

Noun A behavioural software design pattern that defines the flow of the algorithm with the template method.

🗂️ The subject at a glance

  1. Overview
  2. Structure
  3. Usage
  4. C++ example

🏆 Landmark papers (most cited)

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics