Pattern to pattern: Template Method & Strategy

Recently I wrote about the Template Method pattern and how it’s implemented in Ruby. In the comments, one of the readers commented that the Template Method pattern is in fact the Strategy pattern. After thinking hard about how I should answer the question, I thought about writing a post comparing the two patterns. So, here it is - my version of design patterns head to head. Let’s see what these two patterns have in common and what are their key differences....

April 22, 2015 · 5 min · Ilija