Home > Articles > Home & Office Computing > Microsoft Windows Vista & Home Server

An Approach to Windows Vista Gadget Design

  • Print
  • + Share This
Rajesh Lal introduces design considerations, UI challenges, and visual themes to consider when creating gadgets for Windows Vista.
This chapter is from the book
  • "You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away."
  • —Antoine de Saint-Exupery

In This Chapter

  • Design Considerations
  • Challenges for the User Interface
  • Visual Themes
  • Transparent Images in the Gadget

Design Considerations

This chapter is about gadget design and user interface. Design starts with the factors that determine the type of gadget you want to develop, the information it will display, the user interface, the usage pattern, and the behavior of a gadget.

Design includes the dimensions, the images, the text, and the "look and feel." You also decide how the gadget interacts with the user and how it interacts with the system. This chapter discusses the visual theme, how the gadget can look like a part of Windows Vista, and the overall user experience.

Before you start, keep these two things in mind:

  • Justify the space—The Windows Vista Sidebar is neither very tall nor wide. It can have—at the most—five or six gadgets at any particular time. Thousands of other gadgets, freely available online, will compete for the same screen space. So, offering the set of features a user critically needs is an important factor. Be prepared to convince users that your gadget justifies the space.
  • Ensure overall quality—If your users don't experience quality throughout your gadget, they may conclude there is a lack of quality everywhere. This means you need to pay attention to the quality of icons, images, text, background, and interaction. Each of these elements is equally important. A good idea and a great implementation with an average user interface cannot stand up to the competition (see Figure 3.1).
Figure 3.1

Figure 3.1 Two gadgets that perform the same function, one with a nice interface and the other plain and simple. Which one would you prefer?

Consider the following four factors before designing a gadget (see Figure 3.2):

  • Information first
  • The right user interface
  • The gadget's usage pattern
  • The gadget's behavior
Figure 3.2

Figure 3.2 A gadget's design is an important aspect of development.

Putting Information First

Gadgets are meant for a single task. When designing a gadget, keep in mind that a gadget should have a small set of goals relevant to the specific task. A gadget should show only data suitable for that task and that task only. Information in the gadget window should satisfy the following rules:

  • Live data
  • Information for quick access
  • User's choice
  • Brief information for further action

Let's take a closer look at what each of these really means.

Live Data

Gadgets should display only information that changes regularly, such as live feeds, news updates, daily weather, battery status, and so on. Information that is static for more than a day makes a gadget dull.

A user looks to a gadget to see interesting things that are active. Fun gadgets are an exception but can be made more interesting if live data is also added. For example, a subset of a popular game is nice to have in a Sidebar, but it's better if there is live information, like a regularly updated scoreboard, or live updates about the game. If that is not possible, adding a capability to change the gadget's wallpaper (background image) is a good option.

Easy Access to Information

Gadgets are particularly useful at showing information for which users don't have to start an application or open a web page. A good example might be stock values, an event calendar, traffic maps, local fuel cost, and so forth. Any information that saves a user's time makes a gadget worth the space it takes.

Information Relevant to Individual Users

Gadgets are all about user choice and preference. If there are a lot of users for a particular newspaper's crossword puzzle, a gadget that taps into that theme can be an instant hit with them. User-tailored gadgets are very popular, such as a gadget for a Flickr website showing the user's own shared pictures or the user's favorite blog feed.

Information for Further Action

The gadget should show enough information for the user to decide on further action. For example, a website statistics gadget should not show each and every detail corresponding to website usage. It should show statistics for a week or a day and let users decide what further action they want to take.

Case Study: The Soapbox Video Gadget

Imagine you wanted to create a video gadget (see Figure 3.3). The task is to create a gadget for a video feed from http://soapbox.msn.com with the goal of accomplishing the following:

  • Listing frequently updated videos from soapbox.msn.com in a simple and aesthetically pleasing way
  • Playing a video in the flyout
Figure 3.3

Figure 3.3 This fully developed gadget gives quick access to Soapbox video.

A video feed normally contains thumbnails of the video, reviews, and ratings from users. A gadget with these goals gives you the following options for design decision:

  • Making available the thumbnails and ratings for each video
  • Adding capability to browse video by categories
  • Functionality to search for videos by keyword
  • Video resize option with support for Windows Media Player and Flash Player
  • Easy page-wise access to list of videos

Figure 3.3 shows a preview of the Soapbox Video Gadget with all these options. More information about the gadget can be found at http://www.codeproject.com/KB/gadgets/SoapBoxGadget.aspx.

Try to make your gadget feature-rich by providing a complete set of functionality related to a specific task (see Figure 3.4). Think like a user. If the gadget shows a list of videos, the gadget should also categorize them and give easy access to all the items in the video feed.

Figure 3.4

Figure 3.4 This gadget is able to categorize MSN Soapbox videos, giving users easy access to the one they want to see.

Providing the complete set of functionality does not mean that the gadget should do everything the Soapbox video website is doing. Video sharing and review capabilities in the website may not be a part of the gadget. Complete functionality here means the gadget should give access to all the information from the video feed, which is the gadget's input. The users should be able to filter videos, sort them, search by keyword, and play videos in the way they want. In Chapter 11 we will see how to create a video gadget using YouTube Video feedback.

Refer to the checklist of guidelines for gadget development and compare that to this gadget. What live information does the gadget display?

  • Frequently updated soapbox feed.
  • Currently featured videos.
  • Recent videos.

Does the gadget offer quick access to the information it provides?

  • Ability to click on the thumbnail to play the video in the flyout.
  • Ability to browse through the video list.

Does the gadget give the user a choice?

  • Settings page gives an option to customize the list of videos.
  • Users can select the media player and video size.

Does the gadget provide information that lets the user decide on further action?

  • Gadget gives information about the video's ratings, a thumbnail image, and the title in the main window for users to decide to watch the video.
  • Gadget gives Previous and Next options for browsing the videos in the feed.

Constructing the Right User Interface

Gadgets are a visual experience and the right user interface makes all the difference. Here are four pointers for creating one:

  • Keep the gadget simple and aesthetically pleasing.
  • Show only relevant information.
  • Make use of visuals such as icons and images, rather than text.
  • Be sure that the gadget is not too obtrusive.

Simplicity and Aesthetics

A gadget should look simple and aesthetically pleasing. Take a look at the gadget samples provided in Figure 3.5.

Figure 3.5

Figure 3.5 Choice of clear image and aesthetically pleasing fonts can make a lot of difference in gadget design.

Clearly the objects in the first pair are both simpler and more aesthetically pleasing than the obnoxious clock and difficult-to-read note. If a gadget is going to be part of the desktop, it is something the user will look at every day; make sure it is as clear and aesthetic. The choice of color and fonts can also make a difference.

Show Only Relevant Information

The maximum width of a gadget is 130 pixels. That's not a lot of room to work with, especially if there's a lot of information you want to convey. It can be done, however. Just look at the RSS feed and Calendar Gadgets shown in Figure 3.6.

Figure 3.6

Figure 3.6 The RSS feed Gadget shows the title partially in the gadget window, and the complete title is shown as the tooltip.

So, what is it exactly that makes these well-designed gadgets? For one, titles should generally be only as long as the space allows. With some gadgets, like this RSS news feeder, that isn't possible. But in this case, tooltips are applied to good effect. And, although you can't see this clearly from the black-and-white photos in this book, the fonts have different colors to highlight the title.

The RSS Reader Gadget doesn't try to do too much. It displays only four records at a time, and the Calendar Gadget displays just the current month or the current day, based on the user's choice.

Figure 3.7 shows two more gadgets that are designed to accomplish the same goals, but suffer from an extremely poor design.

Figure 3.7

Figure 3.7 The gadget with scrollbars and the overfilled calendar both try to squeeze too much information into the small space.

The presence of a scrollbar in a gadget is unacceptable. It's far better to use paging because a scrollbar can further reduce the already small space a gadget provides. Providing paging functionality to browse multiple items with previous and next options and page numbers can remove the clutter from the gadget screen. Both the Blog and the Calendar Gadgets have far too much information cramped into a small space. That's the kind of design mistakes you should strive to avoid when designing your own gadgets.

Make Use of Visuals

Make use of icons, images, and signs as much as possible; they give visual clues of the functionality (see Figure 3.8). For example, a Weather Gadget can use pictures of clouds, the sun, and rain instead of corresponding text to depict different weather condition. The proper use of images makes the gadget more user friendly.

Figure 3.8

Figure 3.8 Pictures of clouds and sun in the Weather Gadget depict the weather. Computer usage in the form of a CPU meter is more intuitive than plain text.

Two gadgets are compared in Figure 3.8. Both gadgets show the same information, using different designs. However, the designs in the top row have visuals that give a rich experience to the user. When designing a gadget, check for the following:

  • Can any information displayed in the gadget can be replaced by visuals?
  • Is the gadget too plain or does it lack design?

Visual themes are covered in more detail in later section.

Not Too Obtrusive

The design of the gadget should not be too obtrusive. The use of buttons and user controls should be avoided at all costs. For example, using a Previous and Next button can make the gadget look ugly. Instead, use proper images and show them when the mouse is moved over the gadget.

Figure 3.9 compares a Picture Slideshow Gadget with two different designs. The lower gadget shows buttons to browse either the previous image or the next one. The buttons are too obtrusive for a good design. The upper images are examples of a good design. The gadget's default view (upper left) is without any Previous or Next buttons. When the mouse is moved over the gadget, previous and next images are shown.

Figure 3.9

Figure 3.9 The always visible Previous and Next buttons are used to browse images in the Picture Slideshow Gadget (lower image), but they are too obtrusive for the small space.

The Picture Slideshow Gadget shows the action buttons (images) on mouse hover. A good mouseover effect (refer to the upper-right image of Figure 3.9) with proper visuals makes a good design. Note that these are not buttons but images that are aligned with the gadget theme.

Usage Patterns

The type of gadget you want to create also has an impact on its design. As discussed previously, there are four broad classifications:

  • Information gadget
  • Application gadget
  • Utility gadget
  • Fun gadget

These classifications all have common user interface guidelines, but each has its own specific design pattern that needs to be considered during development.

Information Gadget

Information gadgets collect data from multiple sources and are time sensitive. An information gadget normally uses RSS feeds that contain 10 or more items. To display them all in the gadget proper, page number and previous/next options should be available. The use of such options is also referred to as paging. These gadgets refresh their data regularly, so they should not be visually distracting or obtrusive (see Figure 3.10). As stated previously, there should be no scrollbars.

Figure 3.10

Figure 3.10 This example of an RSS Reader Gadget has paging options 1–4 and no distracting images. It reflects good gadget design.

Application Gadget

These gadgets depend on other applications or products for their data and act as a side product or a quick tool for data visualization. These gadgets should be designed with the main product or application in mind. The visual theme should go along with the original application (see Figure 3.11).

Figure 3.11

Figure 3.11 An application gadget mimics the user interface of the original application.

This is an example of a Microsoft Office Recent Documents gadget. The gadget shows the recently used Microsoft Office documents. The corresponding logo of Microsoft Office and icons for Microsoft Word, Excel, and PowerPoint make the gadget look rich and pleasing.

Utility Gadget

Utility gadgets provide quick information or shortcuts to frequently accessed tools and features. There should be no gimmicks in a utility gadget. The size should be appropriate: It should be the smallest of all other types of gadgets and should correspond to the feature it provides (see Figure 3.12).

Figure 3.12

Figure 3.12 A Battery Monitor Gadget displays percentage and time remaining in appropriate size.

This example shows a utility gadget that indicates the amount of battery life remaining in a mobile PC. The information it provides is the percentage of battery remaining and the time left. The background is an image of a battery with a percentage filled with color. This is a good design. There are no bells and whistles, but the size is appropriate and the design is intuitive.

Fun Gadgets

Fun gadgets are more distracting than other types of gadgets. As a result, users are likely to change them more frequently. Their purpose is to entertain or provide some fun activity to the user. If you are making a fun gadget, you must have a strong understanding of your target users and the gadget should have some dynamic features to keep the user interested for a longer period of time. It should also look visually pleasing (see Figure 3.13).

Figure 3.13

Figure 3.13 This Minesweeper Gadget has a visually pleasing interface.

A visually pleasing experience comes with proper use of colors along with neat and clean images. Keep these quick tips in mind:

  • Do not use too many colors; try to stick with two or three colors.
  • Do not use more than one bright color in your gadget window.
  • Check for good contrast colors or shades of the same color.

The example shown here is of a Minesweeper Gadget. It uses only a few colors: gray, black and red. It makes good use of contrast between red and black and the color also reflects the personality of the game.

What Gadgets Are Not Meant For

So far we have discussed what the different usage patterns are and what a gadget is meant for. This section gives you an idea what a gadget is not meant for. Keep this set of rules in mind while designing a gadget:

  • Gadgets are not meant as a substitute for full applications such as email or instant messaging.
  • Gadgets should not be designed as time-sensitive applications.
  • Gadgets should contain no direct advertisements.

A gadget is not meant for notification purposes. Notice of new emails or instant messages should not be a gadget's purpose. Applications such as instant messaging and email notification require more robust applications such as MSN Messenger and Microsoft Outlook. A gadget is lightweight and is designed to supplement these applications rather than compete with them.

A gadget is also not meant for notification applications that need immediate attention because gadgets are not executables running in the user's desktop. They reside in the Sidebar and the user might have closed or hidden the Sidebar to avoid distraction. A gadget should not be a crucial application.

Gadgets can be used for advertisement purposes but are not meant to include banner advertisements or text ads. The small size of gadgets does not allow them. Check the next chapter to get details on the gadget's business model.

Gadget Behavior

The behavior relates to the way the gadget interacts with the user. How a gadget should react in particular circumstances, what a gadget is meant for, and what it is not meant for—all this decides the gadget's behavior.

You need to consider the following to ensure proper gadget behavior:

  • Gadget configuration
  • Refreshing a gadget
  • Errors, information, and warnings
  • Service not available information

Gadget Configuration

Most gadgets have an optional settings page that can be used to configure the gadget. You access it by clicking on the Option menu in the right-click context menu or by clicking the settings icon in the top-right corner of the gadget (see Figure 3.14).

Figure 3.14

Figure 3.14 A settings page of a Weather Gadget enables the user to select a location, as well as choose Fahrenheit or Celsius to display temperature.

Gadget configuration is the only option a user has to customize the gadget. It is a single administration page per instance of the gadget. Any configuration change in the settings page is applied to only that instance of the gadget. Choose wisely what changes a user would like to have in the gadget, based on its functionality. For example, if the gadget allows, give a resize option to a mini version of the gadget with absolute essentials. This gives the user the opportunity to add more gadgets to the Sidebar, which means that your gadget has a better chance of being utilized.

A settings page gives the user an option to customize the gadget according to choice. A configuration page gives more flexibility and freedom to the user and so increases a gadget's usability.

Refreshing a Gadget

If your gadget displays live data, you might need to refresh it regularly or on user demand. Keep in mind that if a user has a slow Internet connection, it can take some time for a gadget to reload. Using a loading image in the waiting screen with the message Getting data... or loading... is recommended (see Figures 3.15).

Figure 3.15

Figure 3.15 A Weather Gadget displays a Getting Data screen, along with a Vista busy cursor (image on the left) to display the status.

Errors, Information, and Warnings

The gadget sometimes needs to display status to the user. For example, an RSS Feed Gadget needs to tell the user when the feed is not available, or if there is no Internet connection available to fetch data from the remote server. These messages can also be custom error messages, warnings, or other information. All these status messages should be shown as inline text with standard 16×16 icons, like the ones shown in Figure 3.16, for the type of message. Pop-up dialog boxes are not allowed in a gadget.

Figure 3.16

Figure 3.16 Standard icons for errors, information, and warnings need to be used for the corresponding status.

A gadget is an HTML file with scripts, so make sure you have handled all the possible errors in the gadget. If there is an unexpected error or warning, display it in the same way as the Getting Data screen shown in Figure 3.15, or display the Service Not Available screen. If the error inside a gadget is not handled properly, a default runtime error message is displayed along with the line number.

JavaScript error messages, like the one shown in Figure 3.17, are annoying. One of these messages and the user will lose all faith in the gadget and won't hesitate to remove or even uninstall it. A good practice is to encapsulate each JavaScript function inside an error handler, a try-catch block.

Figure 3.17

Figure 3.17 Typical JavaScript error messages, like this one, are too vague to be useful to the end user.

A try-catch block is a piece of code that ensures the execution of the catch block if any error occurs inside the try block. Here is the example in JavaScript. The code ensures that the user doesn't get a default JavaScript error dialog:

  // your script code here
 catch (e)
   //set and display your inline error message and icon here

Service Not Available Information

Service Not Available is a default screen that is used in most of the common scenarios. Use the Service Not Available screen where appropriate. For example, if the gadget is in a mobile laptop and the laptop disconnects from the Internet, show a screen with the information icon like the one shown in Figure 3.18.

Figure 3.18

Figure 3.18 A Weather Gadget shows a Service Not Available screen when there is no Internet connection, along with the information icon.

Sample code would look like this:

If (CheckInternetConnection)
  // your functionality code here
   //set and display your inline "Service not available" message and icon here
  • + Share This
  • 🔖 Save To Your Account