
Design Pattern
rocksword
这个作者很懒,什么都没留下…
展开
-
策略模式
先感谢众多朋友的支持、评论和鼓励,只有多多努力,写点好的博文来回报大家的好意! 接下来想写写另外一个虽然较简单,但是使用很频繁的模式——策略模式策略模式(Strategy)1 场景问题1.1 报价管理向客户报价,对于销售部门的人来讲,这是一个非常重大、非常复杂的问题,对不同的客户要报不同的价格,比如:(1)对普通客户或者是新客户报的是全价(2)对老客户报的价格,根据转载 2015-01-24 15:16:30 · 219 阅读 · 0 评论 -
装饰者模式-JDK中InputStream和HttpServletRequsetWrapper源码分析
1 装饰模式概念 1.1 装饰者模式定义定义:装饰模式的基本含义是能够动态地为一个对象添加一些额外的行为职责。 谈到对象行为职责的扩展,我们很容易就能够想到面向对象编程语言的一个重要特征:集成。继承是绝大多转载 2015-01-25 16:48:40 · 335 阅读 · 0 评论 -
Design Patterns Uncovered: The Proxy Pattern
Today's pattern is the Proxy pattern, another simple but effective pattern that helps with controlling use and access of resources. Proxy in the Real World A Proxy can also be defined as a sur转载 2015-04-29 15:59:16 · 390 阅读 · 0 评论 -
Design Patterns Uncovered: The Adapter Pattern
Continuing our series of articles, taking each design pattern one by one, we move onto the Adapter pattern. This pattern is used a lot in Eclipse, allowing plug-ins to be loosely coupled, yet still be转载 2015-04-29 16:27:34 · 387 阅读 · 0 评论 -
Design Patterns Uncovered: The Facade Pattern
This article will focus on the Facade pattern. So far in our design patterns we've already looked at the Observer and Adapterpatterns. Facade has some similarities with the Adapter, so it's a logica转载 2015-04-29 16:33:36 · 303 阅读 · 0 评论