Software Design Patterns for Information Visualization

Abstract:

Despite a diversity of software architectures supporting information visualization, it is often difficult to identify, evaluate, and re-apply the design solutions implemented within such frameworks. One popular and effective approach for addressing such difficulties is to capture successful solutions in design patterns, abstract descriptions of interacting software components that can be customized to solve design problems within a particular context. Based upon a review of existing frameworks and our own experiences building visualization software, we present a series of design patterns for the domain of information visualization. We discuss the structure, context of use, and interrelations of patterns spanning data representation, graphics, and interaction. By representing design knowledge in a reusable form, these patterns can be used to facilitate software design, implementation, and evaluation, and improve developer education and communication.

Introduction:

As recognition of the value of visualization has increased and the demand for visual analytics software has risen, visualization researchers have developed numerous software frameworks to meet these needs. By changing the cost structure governing the design and implementation of visualizations, such frameworks carry the potential to lower barriers to entry and increase the space of feasible visualization designs. Still, there is never a single tool or framework that is appropriate for all problems in a given domain. Developers often migrate between tools (e.g., when developing on a new platform) or build their own systems (e.g., to achieve functionality not available elsewhere).

In either case, an understanding of the design solutions employed within existing tools could aid the programmer in learning and evaluating other frameworks and furthering their own development efforts. However, inspection of source code and design documents, if available, can prove difficult and tedious. Descriptions in the research literature often place more emphasis on novel features than on recurring design patterns. As a result, it can be difficult to identify, evaluate, and re-apply the design solutions implemented within existing frameworks.

Similar issues permeate any discipline steeped in design. Originally developed by Christopher Alexander and his colleagues in architecture [2], design patterns have proven to be a useful means of capturing time-tested design solutions and facilitating their reuse. Patterns aim to explicitly represent design knowledge that is understood implicitly by skilled practitioners.

Perhaps nowhere has the pattern approach been more effective than in software engineering. Gamma et al. [13] describe software design patterns as “descriptions of communicating objects and classes that are customized to solve design problems within a particular context.” Such patterns document object-oriented software design solutions in a fashion independent of specific programming languages. Patterns typically consist of a name, a purpose, a description of when and why to apply the pattern, structural diagrams, examples of use, and a discussion of interactions with other patterns.

Schmidt [18] has noted a number of benefits gained from incorporating design patterns into the development process. He found that patterns enabled widespread reuse of software architecture designs, improved communication within and across development teams, facilitated training of new programmers, and helped transcend ways of thinking imposed by individual programming languages. Schmidt also recommends that practitioners focus on developing patterns that are strategic to a domain of interest, while reusing general-purpose patterns (e.g., those of [13]) as much as possible— an approach we now adopt for the design of information visualization software.

Previous research has applied the design pattern approach to visualization problems. Stolte et al. [21] introduce design patterns describing different forms of zooming within multi-scale visualizations. Chen [7] takes a more ambitious approach, suggesting high-level visualization patterns addressing general visualization concerns. He lists patterns such as Brushing, Linking, and Encoder, the latter encompassing in a single pattern the visual encoding principles (e.g., use of spatial position, color, size, and shape) advocated by Bertin [4], Cleveland [10], Mackinlay [17], and others.

In contrast, this paper considers patterns at a lower level of abstraction, building upon the approaches of Gamma et al. [13] and Schmidt [18] to focus specifically on software design patterns for information visualization applications. We present a set of twelve design patterns that have proven themselves in existing visualization frameworks, spanning issues of application structure, data handling, graphics, and interaction. The patterns were chosen based upon a review of existing frameworks and our own experiences building prefuse [14], an open source toolkit for building interactive visualizations. As Schmidt warns [18], not everything should be cast as a pattern, even if it is possible to do so. We have attempted to select only those patterns whose recurrence and/or significance warrants their inclusion.

Conclusion:

While many of the patterns presented can be fruitfully applied in isolation, it is often in the relationships among patterns that their greatest value is realized. For example, combining the Scheduler (§2.7) and Operator (§2.8) patterns enables the creation of reusable animation operators, while combining the Relational Graph (§2.4) and Proxy Tuple (§2.5) patterns provides a programmer-friendly interface to a powerful and flexible data representation. Figure 14 provides a partial illustration of the relationships between the patterns discussed in this paper, including both the proposed visualization patterns and related patterns from Gamma et al. [13]. The figure provides a roadmap to applying patterns in a holistic fashion.

Given the limited format of this paper, a great deal of discussion and a rich space of examples had to be curtailed. Each pattern warrants a longer discussion than we have provided here. In addition, some candidate patterns have been left out. For example, the Scenegraph abstraction used in 3D toolkits such as VTK [19] and 2D toolkits such as Piccolo [3], can be usefully described in a pattern format. We would also note that observing patterns within real world source code plays an important part in understanding the value of pattern-infused design. Interested readers may wish to explore one or more of the visualization frameworks freely available online, including Improvise [23], the InfoVis Toolkit [12], Piccolo [3], prefuse [14], and the Visualization Toolkit [19].

Finally, we reiterate that patterns are not static entities, but evolving descriptions of best practices. We make no claims as to the finality or completeness of the patterns presented here, only to their observed effectiveness in visualization contexts. We look forward to these and other patterns being proposed, challenged, refined, and applied.