Journal of Computer Applications ›› 2012, Vol. 32 ›› Issue (11): 3062-3066.DOI: 10.3724/SP.J.1087.2012.03062

Previous Articles     Next Articles

Stereotype based pattern notation method

LIU Wei,HU Zhi-gang   

  1. School of Information Science and Engineering, Central South University, Changsha Hunan 410083, China
  • Received:2012-05-28 Revised:2012-07-19 Online:2012-11-12 Published:2012-11-01
  • Contact: LIU Wei

基于衍型的模式标注方法

刘伟,胡志刚   

  1. 中南大学 信息科学与工程学院,长沙 410083
  • 通讯作者: 刘伟
  • 作者简介:刘伟(1982-),男,湖南娄底人, 高级工程师, 博士研究生,CCF会员, 主要研究方向:软件工程、数据挖掘;胡志刚(1963-),男, 山西孝义人, 教授, 博士生导师, 博士, 主要研究方向:软件工程、并行计算、网格计算。
  • 基金资助:
    国家自然科学基金资助项目(60970038)

Abstract: Design pattern plays a very important role in objectoriented software design, development and maintenance. In order to overcome the drawbacks and weaknesses of the previous methods for design patterns notation, SBPN,a stereotypebased pattern notation method was proposed. Based on the stereotype mechanism in Unified Modeling Language (UML), SBPN provides some rules for labeling patternrelated information. It can not only identify precisely the role of a modeling element, such as a class, a method or an attribute in structural diagrams, but also label the information in interaction diagrams. Whats more SBPN provides a solution for labeling patternrelated information in source codes. Some cases were given to describe how to label patternrelated information in class diagrams, interaction diagrams and source codes, and a complex design diagram of sort system was also labeled by SBPN.

Key words: design pattern, Unified Modeling Language (UML), role, stereotype, pattern notation

摘要: 设计模式在面向对象软件设计、开发和维护中发挥着非常重要的作用。为了克服现有设计模式标注方法的缺陷与不足,提出一种基于衍型的模式标注方法SBPN。基于UML衍型机制,SBPN不仅提供了一套规则用于精确标注结构图中类、方法或属性等模型元素的模式角色相关信息,还可以标注交互图中的模式信息。此外,SBPN为源代码中模式信息的标注也提供了相应的解决方案。给出了使用SBPN方法标注类图、交互图和源代码中的模式信息的实例,最后还将SBPN应用于一个较为复杂的排序系统。

关键词: 设计模式, 统一建模语言, 角色, 衍型, 模式标注

CLC Number: