Prev
1
2
3
4
5
6
7
8
9
Next
- Template Method Pattern
- Reusing Functionality vs Reusing Algorithm Structure
- Invert the call structure - Common template calls client code for customization
- Template object defines the template method
- Template object declares abstract hook methods or defines default hooks.
- Subclasses inherit the common template method
- Template method delegates to hook methods implemented in subclass