Template Method Pattern

Noun · Development

Definitions

  1. A behavioral design pattern in which an abstract base class defines the skeleton of an algorithm in a method, deferring certain steps to subclass overrides — ensuring the overall sequence stays fixed while allowing specific steps to vary.

    In plain English: A design where a parent class defines the overall steps of a process, but lets child classes customize individual steps.

    Example: "The report generator uses Template Method — the base class handles header, body, footer ordering, and subclasses just override how each section renders."

Related Terms