A Role-Based Approach to Design Pattern Modeling and Implementation

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.

[1]  Sara Capecchi,et al.  Extending Java to dynamic object behaviors , 2003, Electron. Notes Theor. Comput. Sci..

[2]  Jean-Marc Jézéquel,et al.  Precise Modeling of Design Patterns , 2000, UML.

[3]  Miguel P. Monteiro,et al.  Pitfalls of aspectJ implementations of some of the gang-of-four design patterns , 2004 .

[4]  Gunter Kniesel Delegation for Java: API or Language Extension? , 1997 .

[5]  John Grundy,et al.  Design pattern modelling and instantiation using DPML , 2002 .

[6]  Jin Liu,et al.  RoleOf Relationship and Its Meta Model for Design Pattern Instantiation , 2005, ADMA.

[7]  Stefan Hanenberg,et al.  Roles and Aspects: Similarities, Differences, and Synergetic Potential , 2002, OOIS.

[8]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[9]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[10]  Jing Dong,et al.  UML Extensions for Design Pattern Compositions , 2002, J. Object Technol..

[11]  Hany H. Ammar,et al.  UML Support for Designing Software Systems as a Composition of Design Patterns , 2001, UML.

[12]  Rolf Adams,et al.  Representing Design Patterns and Frameworks in UML - Towards a Comprehensive Approach , 2002, J. Object Technol..

[13]  Siobhán Clarke,et al.  Composition patterns: an approach to designing reusable aspects , 2001, ICSE 2001.

[14]  Davide Ancona,et al.  Jam - A Smooth Extension of Java with Mixins , 2000, ECOOP.

[15]  Elizabeth A. Kendall,et al.  Role model designs and implementations with aspect-oriented programming , 1999, OOPSLA '99.

[16]  David Notkin,et al.  Using role components in implement collaboration-based designs , 1996, OOPSLA '96.

[17]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[18]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[19]  Gregor Kiczales,et al.  Design pattern implementation in Java and aspectJ , 2002, OOPSLA '02.

[20]  Piotr Habela,et al.  Conceptual modelling of business applications with dynamic object roles , 2003 .