23 Strategy
A STRATEGY IS A plan, or approach, for achieving an aim given certain input conditions. A strategy is thus similar to an algorithm, a procedure that produces an output from a set of inputs. Usually, there is more latitude in how a strategy pursues its goal than in an algorithm. This latitude also means that strategies often appear in groups, or families, of alternatives.
When multiple strategies appear in a computer program, the code may become complex. The logic that surrounds the strategies must select a strategy, and this selection code may itself become complex. The execution of various strategies may also lie along different code paths but in code that all resides in a single method. If the choice and execution of various ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access