October 2017
Intermediate to advanced
210 pages
5h 32m
English
The strategy pattern is similar to the command pattern where both are designed to decouple implementation details from the calling type. Both of these patterns also allow for the implementations to be swapped out at runtime. The big difference is the strategy pattern is intended to encapsulate algorithms. When an algorithm is swapped out, the object is expected to perform the same functionality, but in a different way. In the command pattern, when the command was swapped out, it was expected to change the behavior of the object.
Read now
Unlock full access