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

全部博文(51)

文章存档

2020年(2)

2018年(49)

我的朋友

发布时间: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)

发布时间:2018-08-29 04:05:45

原文地址:http://www.oodesign.com/observer-pattern.htmlMotivationWe can not talk about Object Oriented Programming without considering the state of the objects. After all object oriented programming is about objects and their interaction. The cases when certain objects need to .........【阅读全文】

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

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

原文地址:http://www.oodesign.com/memento-pattern.htmlMotivationIt is sometimes necessary to capture the internal state of an object at some point and have the ability to restore the object to that state later in time. Such a case is useful in case of error or failure. Consider.........【阅读全文】

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

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

原文地址:http://www.oodesign.com/mediator-pattern.htmlMotivationIn order to have a good object oriented design we have to create lots of classes interacting one with each other. If certain principles are not applied the final framework will end in a total mess where each objec.........【阅读全文】

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

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

原文地址:http://www.oodesign.com/iterator-pattern.htmlMotivationOne of the most common data structures in software development is what is generic called a collection. A collection is just a grouping of some objects. They can have the same type or they can be all cast to a base type li.........【阅读全文】

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

登录 注册