GoF-Template Method Pattern
Details
- Full Name
-
GoF Template Method Pattern (Behavioral)
Intent:
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses.
When to Use:
-
When you want to implement the invariant parts of an algorithm once and leave it to subclasses to implement varying behavior
-
When common behavior among subclasses should be factored and localized in a common class
Prompt Example:
"Refactore die Report-Generierung nach dem GoF-Template Method Pattern. Der Algorithmus (Daten laden, transformieren, formatieren) bleibt fix, aber die einzelnen Schritte sind austauschbar."
Related Anchors:
-
GoF Design Patterns (Umbrella)