60 likes | 196 Views
Improving UML Class Diagrams using Design Patterns Semantics. Shahar Maoz Work in Progress. Background. UML class diagrams are very popular design and documentation tool for software engineers Many automatic layout algorithms exist and are implemented in CASE tools
E N D
Improving UML Class Diagrams using Design Patterns Semantics Shahar Maoz Work in Progress
Background • UML class diagrams are very popular design and documentation tool for software engineers • Many automatic layout algorithms exist and are implemented in CASE tools • Algorithms are based on optimizing syntactic “aesthetic” parameters (e.g. bends, orthogonality, edge length variation, node distribution, direction of flow) • Result is aesthetically pleasant at best but… • Experiments found no significant improvement in comprehension (e.g. finding mistakes, answering questions) (except for crossing) • Does not work well for “real world size” projects, large diagrams are still very difficult to understand
The Project • Use domain specific semantics to generate better visualizations • Add visual dimensions that are ignored in UML (color, interactivity, semantic filter/zoom) • I chose to use Design Patterns as the domain specific semantics • Goals • Making the diagram more intuitively understandable to software engineers • Help software engineers make better designs by reducing to “cost” of developing and identifying reusable frameworks and code
Design Patterns in One Slide • Design Patterns are reusable object oriented solutions, descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context. • Standard DPs (21) originally defined by the GoF (Gamma et al.), divided into 3 categories: Creational, Structural, Behavioral; well known to experienced SEs • Examples: • Adapter: convert the interface of a class into another interface clients expect. • Command: encapsulate a request as an object, enable parameterize clients with different requests, queue or log requests, support undoable operations
How to use DP in class diagram visualization? • Data (meta data) would come from custom tags inside JavaDoc – accessible to reverse engineering tools • Visual tools to use • Color • Semantic filter / zoom • Work in Progress examples
Challenges • Classes belong to more than one DP • Need to visualize multiple subsets of the diagram • Highlighting is not enough • Need to show DP name (Icon?), information about the role of each class • Show how it scales with a real world project • Integrate into existing algorithms / CASE tools