Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Template Method pattern is a behavioral design pattern in object-oriented programming (OOP) that defines the skeleton of an algorithm in a base class and allows subclasses to provide specific implementations for certain steps of the algorithm. It promotes code reuse and provides a way to define the overall structure of an algorithm while allowing subclasses to customize certain parts of it.

The Template Method pattern follows the "Don't call us, we'll call you" principle. It provides a template or a blueprint for an algorithm, where the overall algorithm is defined in a base class, and specific steps of the algorithm are left to be implemented by subclasses.

  • No labels