Strategy & Template Method Patterns

Clean Code, Episode 27

By Robert C. Martin

50 minAug 2014

At long last, the episode you've been waiting for: the episode on Strategy and Protocol. No—Protocol and Template Method. No—Uh, Strategy and Template Method. Yeah, that's it! S&TM!

In this episode, we are going to tear into the unimaginably powerful, wildly complicated, and ultimately impenetrable Strategy pattern!

Applause

In this episode, secrets will be revealed, mysteries will be solved, enigmas will be explained, and the unknowable will be made known.

You—yes you!—will at last understand how to employ the Strategy pattern, and its brother the Template Method pattern. We'll talk about the costs, the benefits, the uses, and the abuses of these patterns.

It'll be cool. It'll be really cool. It'll be revolutionarily cool!

So come on, what are you waiting for? It's time to dive head-first into the maw of the beast and uncover the ultimate truths of Strategy and Template Method.