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

软件重构中Visitor*设计模式和应用
引用本文:殷定媛,高建华. 软件重构中Visitor*设计模式和应用[J]. 计算机工程与设计, 2006, 27(24): 4817-4820
作者姓名:殷定媛  高建华
作者单位:上海师范大学,数理信息学院计算机科学与工程系,上海,200234;上海师范大学,数理信息学院计算机科学与工程系,上海,200234
摘    要:对当前软件重构领域中的研究作了概括性介绍。对作为重构的主导思想和系统体系结构的总体转换方向的设计模式进行介绍,针对原有的Visitor设计模式在运行中操作调用频繁时资源消耗过大和运行效率降低的不足,在原模式基础上进行改良和优化,生成一种新的设计模式Visitor*,并对其具体分析,通过操作函数的上移和accept方法的重定义,实现了操作定义由Element层到Visitor层的等价转化,大大节省资源和提高运行效率。最后运用Visitor^*实现了一个面向对象设计过程中的重构,并结合一些重要概念对其进行具体分析。

关 键 词:重构技术  形式化方法  重构工具  设计模式  类层次体系架构
文章编号:1000-7024(2006)24-4817-04
收稿时间:2005-11-21
修稿时间:2005-11-21

Visitor* design pattern in software refactoring and application
YIN Ding-yuan,GAO Jian-hua. Visitor* design pattern in software refactoring and application[J]. Computer Engineering and Design, 2006, 27(24): 4817-4820
Authors:YIN Ding-yuan  GAO Jian-hua
Affiliation:Department of Computer Science and Engineering, College of Mathematics and Science, Shanghai Normal University, Shanghai 200234, China
Abstract:A relatively concise introduction of existing research in the field of software refactoring is generally provided.Design pattern as the primary idea for refactoring and the whole transformation direction of system architecture is illustrated.Based on previous Visitor design pattern,a new design pattern called Visitor* is designed aiming at the disadvantage of excessive resource consuming and running efficiency decreasing due to frequently called operation in running and make a concrete demonstration of it,the Element-to-Visitor hie-rarchy equal transformation of the operate definition is realized by moving operate function and redefining accept method,is reduced and running is enhanced.Finally it is applied in realizing the refactoring in an object-oriented programming and analyzed concretely on other main concepts.
Keywords:refactoring techniques   formalisms for refactoring   refactoring tools   design pattern   class hierarchy architecture
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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