首页 | 本学科首页   官方微博 | 高级检索  
     检索      

Decorator模式的研究及应用
引用本文:黄永棚.Decorator模式的研究及应用[J].人天科学研究,2009(2).
作者姓名:黄永棚
作者单位:武汉理工大学管理学院
摘    要:设计模式不仅使开发者更容易理解设计的思路,而且在很大程度上提高开发者的系统设计能力。在面向对象的设计中,我们经常使用继承来扩展对象的功能,但是复杂的继承关系很容易造成类爆炸,而且这种方式缺乏灵活性。Decorator模式可以很好地解决这个问题。以Decorator模式在数据打印中的应用为例,具体介绍Decorator模式问题的产生、解决和效果,同时也说明了Decorator模式带来软件扩充和复用的方便性。

关 键 词:设计模式  Decorator  软件复用

Research and Application of Decorator Pattern
Authors:Huang Yongpeng
Institution:Huang Yongpeng;
Abstract:Design Pattern which not only makes developers more easier to understand the thinking of design, but also improves the devel- oper'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 t...
Keywords:Design Pattern  Decorator  Reusable Software
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号