期刊文献+

应用装饰模式创建CSS

Creation of CSS with the Use of Decorator Pattern
下载PDF
导出
摘要 介绍了应用装饰模式自动生成CSS的方法.原始的设计是基于继承的,子类功能的增加是通过覆盖或扩展父类方法实现的.优化的设计应用了装饰模式,获得了良好的可扩展性和可维护性.将CSS细分成不同的部分,每个部分作为一个装饰类.可以根据需要灵活地使用这些装饰类生成不同风格的CSS.通过对比这两种设计方式,最后列出了利用装饰模式的优缺点. This paper introduces the application of Decorator Pattern in the field of creating CSS automatically. The original design is based on inheritance and the additional functionality of subclasses is implemented by over- riding or extending methods in the superclass. The optimized design that applies Decorator Pattern accommodates the future extension and maintenance. It divides a CSS file into several parts, each of which develops into a dec- orator. These decorators can be flexibly used to create CSS of different style. The processes of both designs are explained in detail. By contrasting both designs, the advantages and disadvantages of the pattern are listed.
作者 肖永刚
出处 《兰州工业高等专科学校学报》 2012年第6期20-23,共4页 Journal of Lanzhou Higher Polytechnical College
关键词 装饰模式 继承 应用 CSS Decorator Pattern inheritance application CSS
  • 相关文献

参考文献5

  • 1W3C. CSS software [ EB/OL]. [ 2012-09-27 ]. http://www. w3. org/Style/CSS/software#editors.
  • 2Eric Freeman, Elisabeth Freeman, Kathy Sierra & Bert Bates. Head First Design Patterns [ M ]. USA : O "reilly Media,2004:91.
  • 3Brett McLaughlin, GaiT Pollice, David West. Head First Object-Oriented Analysis and Design [ M ]. USA : O teilly Media, 2006 : 377.
  • 4黄永棚.Decorator模式的研究及应用[J].软件导刊,2009,8(2):14-16. 被引量:2
  • 5Roger Pressman. Software Engineering:a Practitioner' s Approach [ M ]. 7th edition. USA : McGraw-Hill, 2010 : 221.

共引文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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