Thursday, April 13, 2017

Implementing Strategy Design Pattern(Practical example)

In this video I show how to refactor some ugly if-else nested statements using polymorphism through the strategy design pattern.

Please note that I didn't use code coverage in this occasion, this was more of an Spike than a refactor I would say. My goal was to just show the implementation of the pattern and make a brief video. Of course if you are trying this in real software, please make sure that your code is covered by unit tests before proceeding.


  1. Hahaha... I just remembered that 5 yrs ago I also did a video about the strategy design pattern for the blog. I found it very interesting, to watch it again :)

  2. This comment has been removed by a blog administrator.

  3. Sherilin, I deleted your post since it is spam.Don't advertise your products on my blog. I you want to pay me I will happily ad your banner or a friends section but don't just spam the comments section.


Share with your friends