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

推荐订阅源

J
Java Code Geeks
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
博客园 - 【当耐特】
I
InfoQ
腾讯CDC
人人都是产品经理
人人都是产品经理
H
Help Net Security
Y
Y Combinator Blog
B
Blog
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
D
Docker
博客园 - 聂微东
B
Blog RSS Feed
G
Google Developers Blog

博客园 - 宗哥

物联网到底是什么 青岛市物联网应用和产业发展行动方案 - 宗哥 - 博客园 C#的单例模式引起的自定义异常的捕获问题 - 宗哥 - 博客园 从管理学的角度看Scrum VS2010实践RUP4+1架构模型(3) VS2010实践RUP4+1架构模型(2) VS2010实践RUP4+1架构模型(1) 感知是物联网的核心 .Net平台的下Scrum实践 又看了一遍《小城之春》 物联网技术框架与标准体系 最近我买了辆车 管理学的经典定律 转:全球经典管理类书籍推荐 iphone上推特 安博教育首日上市 跌破发行价 富士康11连跳的背后原因 Tiwitter上不了,不知道用什么标题好 太阳照常升起
设计模式 Tips
宗哥 · 2010-08-03 · via 博客园 - 宗哥

2010-08-03 23:40  宗哥  阅读(207)  评论()    收藏  举报

 Bridge and Strategy

Often, the Strategy Pattern is confused with the Bridge Pattern. Even though, these two patterns are similar in structure, they are trying to solve two different design problems. Strategy is mainly concerned in encapsulating algorithms, whereas Bridge decouples the abstraction from the implementation, to provide different implementation for the same abstraction.

Bridge 强调Abstraction and its Implementation,Strategy强调Aalgorithm Family

Bridge and Adapter

The structure of the Adapter Pattern (object adapter) may look similar to the Bridge Pattern. However, the adapter is meant to change the interface of an existing object and is mainly intended to make unrelated classes work together.

Adapter突出existing,reuse。