We're going to step throught each of these parts, context, problem and solution β¨ :
The context is the situation in which the pattern applies. This should be a recurring situation. π¨π»βπ§
The problem refers to the goal you are trying acheive in this context, but it also refers to any constraints that occur in the context. π
The solution is what you're after : a general design that anyone can apply which resolves the goal and set of constraints. π
β Example
Problem: How do I get to work on timeβ
Context: I've locked my keys in the car. π
Solution: Break the window, get in the car, start the engine and drive to work. π
"If you find yourself in a context with a problem that has a goal that is affected by a set of constraints, then you can apply a design that resolves the goal and constraints and leads to a solution."
γ°γ°γ°γ°γ°γ°
#DesignPatterns #Tips
@ProgrammingTip