Template Method Pattern
The Template Method pattern is a behavioral design pattern in which a base class defines the overall skeleton of an algorithm as a sequence of steps, while deferring the implementation of one or more individual steps to subclasses, letting subclasses customize specific parts of an algorithm without changing its…
8 resources across 3 libraries
Glossary Terms(5)
State Pattern
The State pattern is a behavioral object-oriented design pattern that lets an object alter its behavior when its internal state changes, by delegating state-sp…
Template Method Pattern
The Template Method pattern is a behavioral design pattern in which a base class defines the overall skeleton of an algorithm as a sequence of steps, while def…
Abstract Factory Pattern
The Abstract Factory pattern is a creational design pattern that provides an interface for creating families of related or dependent objects without specifying…
Prototype Pattern
The Prototype pattern is a creational design pattern in which new objects are created by copying (cloning) an existing, fully initialized object — the prototyp…
Null Object Pattern
The Null Object pattern is a behavioral design pattern that replaces the use of null references with a special object implementing the expected interface but e…
Study Notes(1)
Interview Questions(2)
What is the Template Method Pattern?
The Template Method pattern is a behavioral design pattern where a base class defines the fixed skeleton of an algorithm in a single method, deferring specific…
What is a Hook in the Template Method Pattern?
A hook in the Template Method pattern is an optional, overridable step in the base class algorithm, given a default (often empty or no-op) implementation, that…