关键:父类提供模板方法描述方法的步骤,以及一些被私有化的固定操作,声明步骤中的抽象方法,这些抽象方法延迟到子类中实现。所以这个模式是一个两层结构。另外,在模板方法描述的步骤中,可以添加一些钩子方法,给子类个性化提供支持,类似的钩子方法例子:beforeProcess,afterProcess,,类似的单词很有可能表示是钩子方法。