惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
MyScale Blog
MyScale Blog
博客园 - 【当耐特】
I
InfoQ
腾讯CDC
aimingoo的专栏
aimingoo的专栏
L
LangChain Blog
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Vercel News
Vercel News
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
D
Docker
MongoDB | Blog
MongoDB | Blog
量子位
博客园_首页

博客园 - 不再专注于.net技术

嵌入式c/C++ 多线程专题3 - 不再专注于.net技术 - 博客园 多线程调度专题2 - 不再专注于.net技术 - 博客园 多线程同步问题专题(1) TCP/IP卷一(4) TCP/IP卷一(3) TCP/IP卷一(2) TCP/IP卷一(1) Net Programming 设备坐标 删除内存树结构的时候,千万注意内存泄漏问题,采用递归比较简单。 投资收益 Com+ ?? Learning Bridge pattern. debian linux 树结构的遍历与建立树 初始化COM GNU Debian Linux学习 vc调用vb DLL方法
The Strategy Pattern
不再专注于.net技术 · 2006-01-23 · via 博客园 - 不再专注于.net技术

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.