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

推荐订阅源

F
Fortinet All Blogs
罗磊的独立博客
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
博客园 - Franky
博客园 - 聂微东
博客园_首页
爱范儿
爱范儿
量子位
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
Martin Fowler
Martin Fowler
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Vercel News
Vercel News
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Engineering at Meta
Engineering at Meta

博客园 - 不再专注于.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.