Template method pattern
Behavioral design pattern in object-oriented programming which defines the high-level skeleton of an operation to be implemented by helper methods
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.
Nº Q771778 ★
Common · Knowledge
Template method pattern
Behavioral design pattern in object-oriented programming which defines the high-level skeleton of an operation to be implemented by helper methods
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.
From Wikipedia
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. The helper methods may be either abstract methods, in which case subclasses are required to provide concrete implementations, or hook methods, which have empty bodies in the superclass. Subclasses can (but are not required to) customize the operation by overriding the hook methods. The intent of the template method is to define the overall structure of the operation, while allowing subclasses to refine, or redefine, certain steps.
Text: Wikipédia, CC BY-SA 4.0. · Image: Giacomo Ritucci (CC BY-SA 3.0) ·
Related cards
-
Software design pattern
Reusable solution to a commonly occurring software problem
Nº Q181156 ★★★
Not listed
-
Booch method
Developed by Grady Booch
Nº Q2538502 ★
Not listed
-
S
SNOBOL4
Programming language tailored to complex pattern matching and text manipulation
Nº Q121288716 ★
Not listed
-
Adapter pattern
Design pattern in computer program
Nº Q23836 ★★
Not listed
-
T
Template metaprogramming
Programming paradigm that uses compile-time metaprogramming
Nº Q773763 ★
Not listed
-
Pair programming
Collaborative technique for software development
Nº Q607013 ★★
Not listed