Skip to content

A fixed sequence with variable steps

Three report generators all follow the same sequence: open, fetch data, format, write, close. Only fetching and formatting differ.

The template method pattern puts the sequence in a base class and leaves those two steps abstract. What is the trade against using strategies instead?