期刊文献+

Decorator模式的研究及应用 被引量:2

Research and Application of Decorator Pattern
下载PDF
导出
摘要 设计模式不仅使开发者更容易理解设计的思路,而且在很大程度上提高开发者的系统设计能力。在面向对象的设计中,我们经常使用继承来扩展对象的功能,但是复杂的继承关系很容易造成类爆炸,而且这种方式缺乏灵活性。Decorator模式可以很好地解决这个问题。以Decorator模式在数据打印中的应用为例,具体介绍Decorator模式问题的产生、解决和效果,同时也说明了Decorator模式带来软件扩充和复用的方便性。 Design Pattern which not only makes developers more easier to understand the thinking of design, but also improves the developer's systematic designed capacity to a great extent. We often use inheritance to extend object's function in the application of Object- Oriented Programming, but complicated inheritance casuses class explosion. Moreover the method lacks of flexibility. Decorator pattern solve the problem perfectly. The origins, solutions and effects of Decorator Pattern are described in details on the basis of the application in data printing. The expansion and reusage of software brought by Decorator Pattern are also stated at the same time.
作者 黄永棚
出处 《软件导刊》 2009年第2期14-16,共3页 Software Guide
关键词 设计模式 Decorator 软件复用 Design Pattern Decorator Reusable Software
  • 相关文献

同被引文献10

引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部