Loading page…
One delivery checkout, three fee rules: why the first if-ladder stops scaling, how Strategy splits it into an interface, small rule classes and a context that never asks which rule it holds, where the choice of rule moves to, when a function is enough, how Strategy differs from State, Template Method and Decorator, and when not to use it.
You and a friend order the same dinner, from the same restaurant, at the same time.