




























The Strategy Pattern:
仔细审查下面的原理:
1 "Program to an interface, not an implementation."
2 "Favor object composition over class inheritance."
3 "Consider what should be variable in your design.
4 "encapsulate the concept that varies."
Define a family of algorithms, encapsulate each one, and
make them interchangeable. Strategy lets the algorithm
vary independently from the clients that use it.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。