June 2018
Intermediate to advanced
280 pages
7h 46m
English
A particular situation specific to behavioral patterns is when we need to change the way to solve a problem with another one. As we already learned in the first chapter, changing is bad, while extending is good. So, instead of replacing a portion of code with another one, we can encapsulate it in a class. Then we can create an abstraction of that class on which our code depends. From that point, our code becomes very flexible, as we can now use any class that implements the abstraction we just created.
Read now
Unlock full access