Visualizing Design Patterns in Their Applications and Compositions
Design pattern overview A design pattern is a formally documented solution to a design problem. Patterns are used to communicate architectural knowledge, teach new design paradigms, and convey design experience They are normally modeled in natural languages and visual notations (UML)
Design pattern UML Each design pattern typically contains several participants. When the pattern is applied names are changed to suit the application domain This means pattern information represented by the role names is lost. When this happens it becomes difficult to identify the patterns used in the system.
Design pattern
UML Solutions Several approaches have been suggested. -Venn diagram-style annotation -UML collaboration annotation -Pattern:role annotation
Composition of patterns Venn diagram-style
UML collaboration Pattern:Role
Problems with existing solutions Static notations attached to UML diagrams Cannot distinguish between two instantiations of the same pattern Only applied in class diagrams not in sequence or behavioral diagrams Do not cover the roles of operations or attributes.
Previously proposed solutions Design pattern modeling language (DPML) Adds new symbols to UML Design recovery frameworks Logic based languages Specialized version of UML meta-model
New Solution An extension to the existing UML specification through stereotypes Tagged Values for each stereotype role@name [instance] Multiple tags per class are allowed.
Visualization tool On-demand visualization techniques based on coloring and mouse movement VisDP – tool that can hide/show design pattern information on demand. Mouse-over a class in a pattern, and all classes in that pattern turn a different color. Pattern information overlaid over diagram