Chinaunix首页 | 论坛 | 博客
  • 博客访问: 54088
  • 博文数量: 51
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 410
  • 用 户 组: 普通用户
  • 注册时间: 2018-08-26 01:30
文章分类

全部博文(51)

文章存档

2020年(2)

2018年(49)

我的朋友

发布时间:2018-08-29 04:12:47

原文地址:http://www.oodesign.com/bridge-pattern.htmlBridge PatternMotivationSometimes an abstraction should have different implementations; consider an object that handles persistence of objects over different platforms using either relational databases or file sys.........【阅读全文】

阅读(307) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:11:58

原文地址:http://www.oodesign.com/adapter-pattern.htmlAdapter PatternMotivationThe adapter pattern is adapting between classes and objects. Like any adapter in the real world it is used to be an interface, a bridge between two objects. In real world we have adapters for.........【阅读全文】

阅读(350) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:10:54

原文地址:http://www.oodesign.com/null-object-pattern.htmlNull Object PatternMotivationThere are some cases when a system has to use some functionality and some cases when it doesn't. Let's say we have to implement a class that should send the results to a log file .........【阅读全文】

阅读(406) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:07:55

原文地址:http://www.oodesign.com/visitor-pattern.htmlVisitor PatternMotivationCollections are data types widely used in object oriented programming. Often collections contain objects of different types and in those cases some operations have to be performed on all the col.........【阅读全文】

阅读(367) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:06:47

原文地址:http://www.oodesign.com/strategy-pattern.htmlMotivationThere are common situations when classes differ only in their behavior. For this cases is a good idea to isolate the algorithms in separate classes in order to have the ability to select different algorithms at runtim.........【阅读全文】

阅读(411) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册