Chapter 13. Pattern Libraries

Introduction

As indicated in Chapter 1, design patterns have the potential to offer benefits such as proven design solutions and guidance for their use, improved design process, reusability and consistent interfaces, and so forth. To realize these benefits, however, it’s important that design patterns be documented and made available in a format that promotes reuse. Several documented collections of patterns, commonly referred to as pattern libraries, currently exist. Some notable ones include Jenifer Tidwell’s collection of interaction design patterns (Tidwell, 2006), Martijn van Welie’s web site about design patterns (www.welie.com), Van Duyne et al.’s Design of Sites (2006), and Yahoo! Design Pattern Library (developer.yahoo.com/ypatterns/).
Despite the popularity of patterns and pattern libraries, currently there is no consensus on how patterns should be documented, maintained, and shared with others. Nor has there been any empirical research that evaluates the efficacy of existing pattern languages, libraries, and collections designed for user interfaces. Rather than analyze and discuss the pros and cons of different approaches (Dearden and Finlay, 2006; Dennis and Snow, 2006), this chapter presents a pattern library as a pattern and identifies its core elements, as well as offers best practices for its development.

Pattern Library

Problem

In the absence of a formal process for reusing successful design solutions, the design process can be quite inefficient, because designers and developers spend time trying to solve user interface design problems for which successful design solutions have already been identified and implemented. This is often exacerbated when the rationale and context for previously used design solutions is not documented, making it difficult to justify their use.

Solution

Develop a repository of design patterns (i.e., a pattern library), documenting the knowledge of design problems, solutions, rationale, and best practices for implementing solutions (Figure 13.1). In addition, share the pattern library with other designers and developers, promote use and reuse of patterns by incorporating implementation code snippets (i.e., components), and encourage designer and developer participation.
B978012374265000013X/gr1.jpg is missing
Figure 13.1
Yahoo! Developer Network’s Design Pattern Library is available as an open-source pattern library. It offers interaction designers a stencil kit to facilitate development of wireframes and maps many patterns to code snippets in the YUI library to help with its use during development.

Why

For large and/or distributed design teams within a corporation, it is common to find differing user interface designs and interaction approaches for the same design problem across different product lines; they often have different visual treatments as well. This results in inconsistent interfaces, which can lower usability of applications and weaken the corporate brand (Malone et al., 2005). By facilitating the reuse of design solutions, pattern libraries offer an effective way of documenting and sharing solutions for recurring design problems and help achieve desired consistency. Pattern libraries can also make the design process more efficient and increase the productivity of designers by reducing duplicate research and minimizing “reinventing the wheel” (Malone et al., 2005).
Although patterns are design solutions independent of specific implementation issues, design and development teams can further reduce the time spent on user interface development by building software components to support design patterns. After a design pattern is chosen, development teams can reuse and adapt software components and code snippets for implementing selected patterns (Sinnig et al., 2004). Reuse and efficiencies are also achieved since software components typically incorporate related design patterns. For example, a software component for the TABULAR LIST pattern can incorporate the SORTING and PAGINATION patterns and make it easy for developers to implement all three patterns in their designs.
Even when design teams are smaller and colocated, pattern libraries are beneficial because they provide a way to capture design best practices and promote reuse. Because of the limited design and usability resources available to smaller design teams, minimizing rework by reusing known successful design solutions are often of even greater importance than for larger design teams.

How

The first task when documenting a pattern library is to determine how to document each pattern. As indicated in Chapter 1, pattern authors have used differing approaches (including this author) to document patterns, and a consensus on the most effective way of documenting patterns does not currently exist. However, they all contain the following core sections.
Pattern name. The name of the design solution to clearly communicate what the pattern stands for. An unambiguous (and preferably familiar) name is important to make it easy for designers to recognize, select, and remember patterns.
Problem. A brief description of the design problem and the trade-offs faced by the designers, if any.
Solution. A brief summary and an exemplar image that shows the successful design solution. The image may be a sketch or an actual screenshot; the latter is preferred because it shows the design solution in use and helps improve the strength of the pattern.
Reasons the design solution is effective (why). Some form of design rationale is essential to make the case for the pattern. This may be based on empirical research, user interface design principles (or heuristics) and/or user familiarity because of established conventions. This section may also include specific contexts in which the pattern is most appropriate.
Best practices for applying the design solution (how). In most instances, applying a design solution requires attending to additional considerations. For example, when using the DELAY/PROGRESS INDICATOR pattern (Chapter 8), designers may need to know whether to show time elapsed or time remaining and in what contexts. Identifying best practices is essential to ensure the correct use of the selected pattern.
Related design patterns. Most patterns do not stand alone. They are related to other patterns either because their use requires incorporating other patterns or because they complete other patterns. For example, when creating a form, designers have to consider several patterns such as SHORT FORMS, ACTION BUTTONS, REQUIRED FIELD INDICATORS, ERROR MESSAGES, and ACCESSIBLE FORMS, among others. Indicating such relations can help designers discover the relationships among patterns and ensure consistent and usable design. The related design patterns section sometimes reference similar patterns in other pattern collections as well.
There are other sections that may be beneficial, including:
Comments. To promote sharing and discussion among designers and developers, a pattern may include a discussion or comments section (Figure 13.2). This could help capture the “collective wisdom” of designers and can help improve patterns or at least document various scenarios in which a pattern was applied successfully or required changes. The comments section is common in publicly available libraries such as Welie.com, UC Berkeley Pattern Library, and Fluid Open Source Design Pattern Library.
B978012374265000013X/gr2.jpg is missing
Figure 13.2
Welie.com’s patterns allow users to post comments to discuss a pattern and to subscribe to the RSS feed if they want to stay informed of pattern changes.
Research evidence. To improve pattern validity and strength, it may help to include empirical or research evidence that demonstrates a pattern’s benefits. Supporting research can be added in a section such as research evidence, usability results, or user feedback (Spool, 2006).
History or change log. Any changes made to patterns based on feedback from other designers and developers or from research evidence can be logged and shown in a history section (Figure 13.3).
B978012374265000013X/gr3.jpg is missing
Figure 13.3
Sakai pattern library lists the changes made to a pattern in the “Recent Changes” section.
For both smaller and larger design teams, developing pattern libraries may seem to be a monumental task. 1 Therefore, to get started with developing a pattern library, including only the core elements of a pattern may be sufficient; tapping from open-source pattern libraries is also a good way to seed pattern libraries. The benefits of pattern libraries are immediate in that with each pattern added to the library, the designs are available for reuse.
1Interestingly, many of the popular pattern library repositories on the Web, such as Welie.com, ui-patterns.com, uipatternfactory.com, and designinginterfaces.com, are works of a single individual.

INCLUDE IMMEDIATELY (RE)USABLE DESIGN COMPONENTS

An important goal of a pattern library is to promote the reuse of design solutions. Pattern libraries should therefore consider offering artifacts that would make use of a proposed solution easier for both interaction designers and developers. For example, to facilitate reuse by interaction designers, pattern libraries can include sample site-maps, workflow diagrams, and wire-frames; these many be in the form of stencils or visual components (Figure 13.4).
B978012374265000013X/gr4.jpg is missing
Figure 13.4
Yahoo!’s Design Pattern Library offers users a stencil kit in several formats (e.g., OmniGraffle, Microsoft Visio, PDF, etc.) to help in wire-frame design in designers’ preferred tools.
Similarly, to facilitate reuse by developers, include code snippets in HTML, CSS, JavaScript, PHP, ASP, JSP, and so on, as appropriate for a development team, to make it easy for them to copy and paste snippets in their code when building the application (Figure 13.5).
B978012374265000013X/gr5.jpg is missing
Figure 13.5
Yahoo! UI Library has several components to help implement their patterns. (They are not linked to the patterns, however.)
When offering software components for reuse, it’s important to test them for necessary cross-browser compliance, performance, and interaction with other components before including them in the pattern library. It’s also important to emphasize that components may not be completely pluggable solutions and may require some tweaking and updates. As development team practices and technology change, review and retest components to ensure their continued usefulness.

INCLUDE MANY, MANY EXAMPLES

By definition, patterns prove their merit by their use (Winn and Calder, 2002). Without clear evidence of successful use, patterns may have limited “strength.” Alexander’s patterns (Alexander et al., 1977) and a few user-interface design pattern collections (Bochers, 2001) usually indicate the strength of a pattern using a star-rating system (Graham, 2003). Graham (2003, p. 52) states:
Again, following Alexander, we have classified the patterns according to our degree of confidence in them. The pattern’s “star rating,” shown next to its name in orange, indicates this. Three stars means that we are totally convinced of the pattern’s efficacy, having used it or seen it used successfully on many projects. Three stars may also mean, especially for abstract patterns, that there is a solid theoretical derivation or justification of the pattern in the literature and folklore of the subject. If there are no stars it means that we think this is a good idea but would like people to try and see. One and two stars are interpreted on the scale between these extremes in the evident manner.
Applying a star-rating system is difficult because it requires a judgment on the part of the pattern authors or the design team (one of the reasons for its absence in this book). In addition, applying a star-rating system in a corporate setting may be counterproductive, as it may appear to offer design teams leeway when they consider patterns with lower star ratings. Including several examples of usage of patterns is more effective because users can see instances of a pattern’s use and determine its appropriateness for their design problem. Furthermore, patterns are often derived from actual use rather than theoretical constructs or principles, making it important to include a range of examples that show the use of patterns in a variety of applications (Figure 13.6).
B978012374265000013X/gr6.jpg is missing
Figure 13.6
UI Pattern Factory (www.uipatternfactory.com) shows a gallery of screenshots for each pattern. Users can also see additional screenshots on the accompanying public Flickr group.
In addition to actual screenshots that illustrate the pattern’s use, consider showing users a list of applications where the pattern is used. This is particularly useful for corporate pattern libraries, where showing reference implementations of suggested patterns by even a few product lines within the corporation can both justify their use and allow designers and developers to explore different ways in which patterns are applied (Figure 13.7).
B978012374265000013X/gr7.jpg is missing
Figure 13.7
Yahoo! Pattern Library shows examples of the use of a pattern on Yahoo! properties (in the “As Used on Yahoo!” section) as well as code examples (in the “YUI Code Examples” section).

DEMONSTRATE RICHER INTERACTIONS

Many design patterns, especially for Rich Internet Applications (RIAs), are embodied in the user interaction. Such interactions can be made clearer if users can experience the interactivity suggested by the pattern. When such is the case, it’s useful to allow users to experience the interactivity as an interactive prototype, animation, or movie (Figure 13.8).
B978012374265000013X/gr8.jpg is missing
Figure 13.8
Yahoo! Pattern Library uses animation to illustrate relevant interactions.

INCLUDE ACCESSIBILITY AND INTERNATIONALIZATION CONSIDERATIONS

If accessibility and internationalization-related design patterns are not separately documented, it’s important to include relevant best practices with the patterns themselves; the necessary accessibility and internationalization hooks should be included in corresponding software components as well.
Although a few of the current pattern libraries include accessibility considerations (e.g., Yahoo! Pattern Library, UI Patterns, and Fluid Open Source Design Pattern Library; Figure 13.9), none currently include internationalization considerations. However, their inclusion is important for companies that plan to localize their applications (see Chapter 10 for details on internationalization considerations).
B978012374265000013X/gr9.jpg is missing
Figure 13.9
Fluid Open Source Design Pattern Library lists accessibility considerations for its patterns. This example shows the accessibility considerations for the LIST BUILDER pattern (see www.uidesignpatterns.org/content/list-builder).

CONSIDER INCLUDING ANTIPATTERNS

Antipatterns are inappropriate solutions that appear to be good solutions to a given problem; they are also referred to as pitfalls (Gamma et al., 1995). Although not mentioned by Christopher Alexander (Alexander et al., 1977), who proposed the notion of patterns, there may be some benefit to including antipatterns in the pattern library if the use of inappropriate design solutions seems to be a common practice.
A good example is the HOVER & COVER antipattern noted by Scott (2008), who described it as when the hover actually hides important contextual information around the object or gets in the way of other actions (Figure 13.10). Antipatterns observed by Scott also include MEANDERING WAY, TINY TARGETS, POGO STICK NAVIGATION, LINKITUS, ANIMATION GONE WILD, WINDOWS APLENTY, and MISSED MOMENTS, among others.
B978012374265000013X/gr10.jpg is missing
Figure 13.10
Description of HOVER & COVER antipattern. (Source:Scott, 2008.)
Because antipatterns are design practices that should be avoided, they should reference appropriate design patterns or suggest design practices to improve the design. An alternative to including antipatterns is to indicate the correct practice within the original pattern itself. For example, when describing a hover pattern, one of the best practices (or the “how”) can indicate that when using the hover method, the contextual information or actions around the object should not be occluded (i.e., covered).

MAKE FINDING APPROPRIATE PATTERNS EASY

To encourage use, pattern libraries must make finding appropriate patterns easy. This can be accomplished by allowing users to browse patterns in multiple ways such as by user tasks, design requirements, application type, alphabetical list, and so forth (Figure 13.11).
B978012374265000013X/gr11.jpg is missing
Figure 13.11
Yahoo! Design Pattern Library organizes patterns based on user tasks and alphabetically (when user clicks “see all…” next to “Recent Patterns”).
When listing patterns, include a thumbnail of the pattern to make it easy to scan patterns and identify an appropriate match, as well as discover other relevant patterns (Figure 13.12).
B978012374265000013X/gr12.jpg is missing
Figure 13.12
User Interface Design Pattern Library, UI Patterns (www.ui-patterns.com), uses a thumbnail, pattern name, and brief description to make it easy for users to find the desired pattern.
Designers would also benefit if they were provided assistance in selecting appropriate patterns based on one or more design goals; this is especially helpful when choosing from a set of seemingly related patterns. As with the FILTERING pattern (see Chapter 6), users can adjust their design criteria to narrow or expand their pattern choices (Figure 13.13).
B978012374265000013X/gr13.jpg is missing
Figure 13.13
Information Design Patterns (www.infodesignpatterns.com) makes finding relevant patterns easy by allowing users to filter them using categories such as “Display Patterns,”“Behavior Patterns,” and “Interaction Patterns.”

ENABLE AND ENCOURAGE PARTICIPATION

To encourage participation from other designers and developers, enable users to rate patterns, post comments, and/or suggest ideas for new patterns (Figure 13.14).
B978012374265000013X/gr14a.jpg is missing
B978012374265000013X/gr14b.jpg is missing
B978012374265000013X/gr14c.jpg is missing
Figure 13.14
Pattern libraries can encourage participation from other users in several ways: UI Patterns allows users to rate a pattern’s usefulness by voting “thumbs-up” or “thumbs-down” (a); UC Berkeley Web Patterns allow users to post their comments and code (b); and UI Pattern Factory invites users to share their ideas and suggest patterns in a “Pattern Ideas Forum” (c).
Although not common, it helps to allow designers and developers to suggest and publish patterns in an open-source fashion. At a minimum, it should be made possible for them to submit examples and screenshots for existing patterns, which may be added as photo galleries. With each example, users may indicate how the pattern was used and their comments on the evidence of successful use or contexts in which its use was found to be inappropriate.
A good example is UI Pattern Factory. They allow users to contribute pattern examples using Flickr. Users can join the public Flickr group (UIPatternFactory.com), upload screenshots, tag them with the pattern name, and submit them to have them included with other examples for that pattern (Figure 13.15). In addition, participation from users should be acknowledged not only to recognize their contributions, but also to serve as an incentive for others to contribute.
B978012374265000013X/gr15.jpg is missing
Figure 13.15
UIPatternFactory.com group on Flickr, which allows members to add their own screenshots to any of the existing patterns.
To ensure that interested users can keep themselves informed of the changes, offer them the option to subscribe to RSS feeds (Figure 13.16).
B978012374265000013X/gr16.jpg is missing
Figure 13.16
On Welie.com, users can subscribe to RSS feeds and stay informed of any changes.

ESTABLISH A PROCESS FOR MANAGING PATTERN LIBRARIES

Finally, and perhaps most important, pattern libraries should be managed just like any other software application. In particular, they should have a clear process around adding, updating, and archiving (or deprecating) patterns. It’s also important to determine the process around the approval of patterns before publishing them. The process should indicate how patterns move from a draft or proposed stage to the approved stage, how participants provide feedback, how disagreements are resolved, how each proposal will be voted on, and so forth (Figure 13.17; see Crumlish, 2008; Malone et al., 2005). If software components are included in the pattern, it’s important that the processes around code review and testing are included as well.
B978012374265000013X/gr17.jpg is missing
Figure 13.17
Pattern Library Workflow used by Yahoo! (Source: Malone et al., 2005.)
To ensure that the pattern library stays relevant and useful, it is important to monitor and refine or extend the patterns to ensure their continued efficacy and applicability. Some patterns may become obsolete because of improved design approaches. For example, the design pattern CAPTCHA (see Chapter 3), although appropriate now, may become obsolete as other technological approaches emerge to distinguish between humans and automated agents.Alternatively, some patterns may not change in how they work but have to be updated because of improved implementations. For example, forms that were once laid out using tables may now be positioned using cascading style sheets (CSS). Any such changes made to the patterns must be marked as “updated” to inform designers and developers of the changes; the changes may be sent out via RSS feeds as well. To ensure that changes to patterns are not made in an arbitrary fashion, it’s important to define and adopt some form of change control process.

CONSIDER USING A WIKI FOR DEVELOPING PATTERN LIBRARIES

A wiki should be considered for developing pattern libraries, since they make collaboration easier by allowing several people to add, change, and remove content (Figure 13.18). A wiki also maintains a history of changes and makes it possible to revert to a previous version, if necessary; such built-in version control makes a wiki useful for single-author pattern libraries as well. With features such as easy linking among web pages, a wiki also makes it easy to link related patterns. Finally, by supporting a discussion among its participants, a wiki makes participation easier.
B978012374265000013X/gr18.jpg is missing
Figure 13.18
Michael Mahemoff maintains AjaxPatterns.org, a pattern library for Ajax-related patterns, as a wiki.

Related pattern libraries

Review the following user-interface design pattern libraries for inspiration:
• Fluid Open Source Design Pattern Library: www.uidesignpatterns.org.
• Jenifer Tidwell’s collection of interaction design patterns: www.designinginterfaces.com.
• Martijn van Welie’s web site about design patterns: www.welie.com.
• Sakai UI Design Patterns: bugs.sakaiproject.org/confluence/display/DESPAT/ Home.
• UC Berkeley Pattern Library: groups.ischool.berkeley.edu/ui_designpatterns/webpatterns2/webpatterns/home.php.
• UI Pattern Factory: www.uipatternfactory.com.
• UI Patterns, User Interface Design Pattern Library: www.ui-patterns.com.
• Yahoo! Design Pattern Library: developer.yahoo.com/ypatterns/.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.249.141