Guidelines on the aesthetic quality of UML class diagrams

https://doi.org/10.1016/j.infsof.2009.04.008Get rights and content

Abstract

In the past, formatting guidelines have proved to be a successful method to improve the readability of source code. With the increasing success of visual specification languages such as UML for model-driven software engineering visual guidelines are needed to standardize the presentation and the exchange of modeling diagrams with respect to human communication, understandability and readability. In this article, we introduce a new and encompassing taxonomy of visual guidelines capturing the aesthetic quality of UML class diagrams. We propose these guidelines as a framework to improve the aesthetic quality and thus the understandability of UML class diagrams. To validate this claim, we describe in detail a controlled experiment carried out as a pilot study to gather preliminary insights on the effects of some of the guideline rules on the understandability of UML class diagrams.

Introduction

In 1995, Booch, Rumbaugh and Jacobson integrated their software modeling approaches into a common approach, today known as the Unified Modeling Language (UML). The commonly agreed notation is still one of the main success factors of UML. However, even after several iterations, the de-facto standard modeling language still comprises inconsistencies and weaknesses, e.g. in formal semantics. One additional drawback of UML regarding human communication is the large number of possibilities for designing and displaying models, e.g. presentation options. In this article, we discuss the aesthetic quality of UML class diagrams, i.e. the quality of the presentation in terms of readability and layout. In fact, UML class diagrams represent the most stable diagram type of UML in the last years. Based on a web survey on the usage of UML, class diagrams appear to be the most used diagram type in the UML [7]. More than 170 responses showed that class diagrams are more often used than use case diagrams, sequence diagrams and even use case narratives.

After twelve years of UML and four years of UML version 2, one would assume that current tools should be able to perfectly support the UML. In our recent study on more than 60 UML tools [14] we found that most tools are still far away from a significant compliance level. The model interchange standard is often disregarded and the diagram interchange standard is not adopted at all. Thus, collaborative work is still restricted to the same tool (family). Further, the tools do not provide the necessary functionality for assessing or enforcing visual guidelines.

One problem in interchanging and communicating diagrams is the lack of commonly agreed publicly available guidelines. Such guidelines describe how to model high-quality, readable and aesthetically appealing UML (class) diagrams. The OMG avoided discussing this problem and removed almost all hints on style and layout from UML 2. In the meantime, several proposals on visual guidelines for UML class diagrams have been published.

Early guidelines focused on graph drawing aspects, e.g. the number of edge crossings. In recent years, however, the focus shifted more towards guidelines also incorporating perceptional, architectural or semantic information. In this article, we therefore discuss current approaches based on criteria derived from several related disciplines such as human diagram perception, software engineering, software visualization and graph drawing and propose a taxonomy of guidelines for UML class diagrams.

Apart from achieving aims such as improving communication, a commonly agreed visual guideline for high-quality UML class diagrams would also influence the quality of related tools. Standardized aesthetic quality assessment features may be offered similar to code quality tools today. A standard on aesthetic quality would also foster the development of specialized layout algorithms to visualize the (intermediary) results in model-driven development in a standardized way supporting exchange and understandability among software engineers. As an example, we realized related tools for our layout guideline, e.g. layout algorithms implementing our guideline, layout metrics and a regression test mechanism based on our guideline [13].

One of the most serious problems encountered on the way to developing a set of common guidelines is empirical validation, as there is no formal theory that can predict whether a specific visual guideline is able to improve the understandability of a diagram. In order to achieve credibility for an approach it is often regarded as crucial to provide empirical evidence of its usefulness [30]. This is often called “evidence-based software engineering” [8]. This is required as only empirical evidence can ensure the real-world usefulness of theories of software engineering [3].

Experimentation already has some history in visual guidelines. The major result of these studies is that the reduction of edge bends is more important than optimizing a layout with respect to the number of crossings. Some recent evaluations also consider advanced issues such as architectural importance or perceptual issues. To contribute to a common visual guideline for UML class diagrams, we discuss existing guidelines in terms of a new taxonomy on guideline rules and present an empirical validation of some of these rules.

This article is structured as follows: In the next section we introduce some basic terminology. In Section 3 we list related work on guidelines, tools, algorithms and empirical studies. Section 4 introduces a new taxonomy for visual guidelines for UML class diagrams. In Section 5, we describe an empirical validation for some guidelines. Finally, in Section 6 we summarize our results, draw conclusions and discuss work to be done in this field in the future.

Section snippets

Terminology

In this section, we introduce some important terms as a basis for the discussion in this article.

By definition, a graph is a structure consisting of nodes (vertices) and edges (arcs) connecting nodes. Dependent on the application domain, different types of graphs may be appropriate, e.g. whether multiple edges are allowed between two nodes or whether nodes may contain subgraphs (compound graphs). When using the terms graph, node or edge in this article we refer to graph structures, algorithms

Related work

In this section, we discuss previous work related to the evaluation of layout guidelines for UML diagrams. While we include guidelines for general diagrams, we focus on UML and in particular on UML class diagrams. The usefulness of guidelines must be determined based on empirical validation. Thus, we review related work on evaluating modeling conventions and user (layout) preferences.

Review and taxonomy of guidelines

In this section, we review existing guidelines on the visual arrangement of UML class diagrams as a meta-study. In particular, we indicate the influence of the individual guideline rules on the aesthetic quality by discussing their relations to well-known laws of perception.

First, we present a taxonomy consisting of four top-level categories and several second-level categories. For the top-level categories we then list the related rules from literature, i.e. basic rules from the UML

Empirical validation

The underlying reason for researching layout guidelines for UML class diagrams is the expectation that a better layout will have positive effects on the performance of people working with the diagrams. In particular, it should increase the understandability of diagrams and thus the efficiency and correctness in working with them. While some of the guidelines, which were discussed above, have been validated empirically, many guidelines have not yet been systematically analyzed. As a consequence,

Results and conclusion

In this article, we presented a detailed discussion on visual guidelines for UML class diagrams. We introduced a new taxonomy of guidelines and classified in particular diagramming rules from literature and semantic layout rules for UML class diagrams. Some of the rules were also derived from our own work in relation to laws of perceptional theory.

This taxonomy is more extensive than other taxonomies and provided a sound basis for our categorization of existing empirical research in the area.

Acknowledgments

We would like to thank those of our students who participated in the pre-study and the experiment. We would also like to thank the anonymous reviewers and the editors who contributed significantly through their feedback to this article.

References (30)

  • M. Zelkowitz et al.

    Experimental validation in software engineering

    Information and Software Technology

    (1997)
  • S.W. Ambler

    The Elements of UML 2.0 Style

    (2005)
  • O. Andriyevska, N. Dragan, B. Simoes, J.I. Maletic, Evaluating UML class diagram layout based on architectural...
  • V.R. Basili et al.

    Building knowledge through families of experiments

    IEEE Transactions on Software Engineering

    (1999)
  • V.R. Basili et al.

    A method for collecting valid software engineering data

    IEEE Transactions on Software Engineering

    (1984)
  • A. Cockburn

    Writing Effective Use Cases

    (2001)
  • E. Dengler, W. Cowan, Human perception of laid-out graphs, in: S.H. Whitesides (Ed.), Graph Drawing: Sixth...
  • B. Dobing et al.

    How UML is used

    Communications of the ACM

    (2006)
  • T. Dybå et al.

    Evidence-based software engineering for practitioners

    IEEE Software

    (2005)
  • A. Egyed

    Automated abstraction of class diagrams

    ACM Transactions on Software Engineering and Methodology

    (2002)
  • H. Eichelberger, Automatic layout of UML use case diagrams, in: Proceedings of SoftVis 2008, ACM Symposium on Software...
  • H. Eichelberger, Evaluation-Report on the Layout Facilities of UML Tools, Technical Report 298, Institut für...
  • H. Eichelberger

    Nice class diagrams admit good design?

  • H. Eichelberger, Aesthetics and Automatic Layout of UML Class Diagrams, Ph.D. Thesis, Fakultät für Mathematik und...
  • H. Eichelberger, Y. Eldogan, K. Schmid, A Comprehensive Survey of UML Tool Capabilites and Compliance, Technical Report...
  • Cited by (36)

    • Evaluating the layout quality of UML class diagrams using machine learning

      2022, Journal of Systems and Software
      Citation Excerpt :

      Edge overlapping is similar to node overlapping. At least a segment of one edge is not visible as an individual path, which means the entire diagram is not readable (Eichelberger and Schmid, 2009). The difference among sizes of the rectangles representing classes should be minimized (Eichelberger, 2005).

    • Structuring large models with MONO: Notations, templates, and case studies

      2019, Model Management and Analytics for Large Scale Systems
    • A Guidelines framework for understandable BPMN models

      2018, Data and Knowledge Engineering
    • Assessing the use of slicing-based visualizing techniques on the understanding of large metamodels

      2015, Information and Software Technology
      Citation Excerpt :

      Various works have been conducted on layout to propose new algorithms and methods for minimizing relations crossing [9–11]. Different guidelines for drawing class diagrams have also been proposed [12,13]. Moreover, several research works proposed to represent class models differently than using class diagrams [14] or in 3D [15–17].

    • Toward a quality framework for business process models

      2013, International Journal of Cooperative Information Systems
    View all citing articles on Scopus
    View full text