基于角色的设计模式建模和实现方法
DOI:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

Supported by the National Natural Science Foundation of China under Grant No.60373086 (国家自然科学基金); the Wuhan Scientific & Technical Key Industrial Project of China under Grant No.20051001007 (武汉市科技局重大产业化项目)


A Role-Based Approach to Design Pattern Modeling and Implementation
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    虽然设计模式有利于软件的重用,但当设计模式实例化时,存在模式的重叠、可追踪性以及模式代码难于重用等问题.提出一种基于角色的设计模式的建模和实现方法,在设计和实现两个层面上解决上述问题.该方法把设计模式的角色作为独立的建模元素,在应用程序类和角色间导入RoleOf关系,使应用逻辑和模式逻辑完全分离,从而提高其重用性.使用UML的标准扩充机制,给出了RoleOf关系的元模型和语义,以及标识模式信息的构造型和标记值,以此解决模式的重叠和可追溯性等问题.通过对Java语言进行扩充(称为Rava),实现了应用逻辑和模式逻辑的动态绑定.该方法较好地解决了设计模式实例化时的模式重叠和可追踪性问题,提高了模式逻辑的可重用性,对运用设计模式开发软件有一定的指导作用.

    Abstract:

    Although design pattern is quite useful in software reuse, there are still many barriers when instantiating the design patterns, such as pattern overlapping, traceability, and difficulties in reusing the pattern code. A role-based approach for design pattern modeling and implementation is proposed. In this approach, roles of pattern are treated as the independent modeling elements and the RoleOf relationship is used to associate a role with an application class. This can improve the reusability of pattern. The meta-model of the RoleOf relationship for pattern instantiation and its semantics are proposed using UML extension mechanism. The stereotypes and tagged values used for identifying pattern information are provided, and it resolves the traceability and overlapping problem in pattern instantiation. The dynamic binding of application and role logic are implemented through the extension to Java language, called Rava. The approach proposed in this paper can effectively solve the problem such as pattern overlapping and traceability during the pattern instantiation, which improves the reusability of pattern logic and guides the software development using design patterns.

    参考文献
    相似文献
    引证文献
引用本文

何成万,何克清.基于角色的设计模式建模和实现方法.软件学报,2006,17(4):658-669

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2005-09-02
  • 最后修改日期:2005-11-09
  • 录用日期:
  • 在线发布日期:
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号