130 likes | 145 Views
An OPM-Based Layered Architecture for Modeling Design Patterns. Galia Shlezinger Dr. Iris Berger Prop. Dov Dori. Agenda. Design pattern Metamodeling framework Three-layer architecture for modeling design patterns Summery. Design patterns.
E N D
An OPM-Based Layered Architecture for Modeling Design Patterns Galia Shlezinger Dr. Iris Berger Prop. Dov Dori
Agenda • Design pattern • Metamodeling framework • Three-layer architecture for modeling design patterns • Summery
Design patterns • A design pattern is defined as a description of a solution to a recurring design problem. • The most common use of design patterns is as a reference for the designer. The system model itself usually contains no record of the patterns that were used.
Design pattern model • Most works on design patterns consider only the solution part of the design pattern. • The problem part of the design pattern is not less important than the solution part, as it puts the solution in the correct context and enables reuse of the solution.
Modeling the entire design pattern • Pattern and Component Markup Language (PCML)[1] – Supported by a design tool. • Design pattern matching [3] – extends the PCML meta-model and allows simplified search of patterns. • The pattern model is separate from the system model In both solutions.
Classical Framework for metamodeling[2] Meta-metamodel (M3) OPM UML Metamodel (M2) Structure and semantics Design pattern model M1.5 OPM model UML model Model (M1) Information (M0) System implementation
Three design pattern abstraction levels Meta design pattern level (M2) Design pattern level (M1.5) System level (M1)
Design pattern level (M1.5) The Observer pattern: • Problem: • Solution:
System level (M0) • Observer pattern implementation: • The pattern model is mapped to the system model using meta-libraries.
Summery • All aspects of the design pattern are modeled (and therefore considered). • The knowledge of which design patterns are used in a system model is contained in the model itself. • OPM meta-libraries are used to map design pattern models (M1.5) to the system model (M1). • The design pattern models can be searched to find problems similar to the one at hand.
References [1] Object Venture Inc. PCML - Pattern and Component Markup Language, www.objectventure.com/pcml.htm [2] OMG, "Meta Object Facility (MOFTM)", version 1.4, 2003, http://www.omg.org/docs/formal/02-04-03.pdf [3] Petri, D., Csertan, G., "Design Pattern Matching". Periodica Polytechnica Ser. El. Eng. Vol. 46, no. 3-4, pp. 205-212