Template Method
Defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Lets subclasses redefine certain steps without changing the algorithm's structure.
Template Method: A Skeleton with Hooks
Defining the skeleton of an algorithm in a base class, letting subclasses fill the steps.
Template Method in Production: Frameworks and Lifecycles
Frameworks as template methods — callbacks, lifecycles, and inversion of control.
Advanced Template Method: Enforcing Invariants and Contracts
Making the skeleton safe: assertions, contracts, and design-by-contract in template methods.
Template Method: Review & Mastery Quiz
Scenario questions on skeletons, hooks, and contracts.
Free Books & Guides
Refactoring.Guru — Template Method
The definitive modern guide to the Template Method pattern. Clear explanations, UML diagrams, real-world analogies, and code examples in multiple languages.
SourceMaking — Template Method
A comprehensive companion guide covering the Template Method pattern with detailed rules of thumb, criticisms, and robust code snippets.
GoF Design Patterns — Template Method
The original Gang of Four book describing the pattern. Available in the "Design Patterns: Elements of Reusable Object-Oriented Software" on Wikipedia.
Official Documentation
Refactoring.Guru — Template Method
The definitive modern guide to the Template Method pattern. Clear explanations, UML diagrams, real-world analogies, and code examples in multiple languages.
Wikipedia — Template Method Pattern
Wikipedia article explaining the Template Method pattern with examples and history.
Video Courses
freeCodeCamp — Design Patterns Course
A comprehensive multi-hour video course covering all major design patterns with implementations in JavaScript and TypeScript.
Design Patterns in Modern JavaScript Playlist
YouTube playlist covering creational, structural, and behavioral patterns with clear code walkthroughs.
Web Dev Simplified — Template Method
Clear, concise video tutorials covering design patterns with practical examples.
Practice & Examples
Awesome Low-Level Design (GitHub)
A curated collection of free LLD resources, pattern implementations, and interview problems across multiple languages.
Design Patterns Implementation (GitHub)
The most popular open-source collection of design pattern implementations with detailed explanations.
Refactoring.Guru Examples in Template Method
Code examples of the Template Method pattern in TypeScript, Python, Java, and more.

