Constraints

Constraints reduce the number of ways to perform a task and the amount of knowledge necessary to perform a task, making it easier to figure out. Norman describes this as knowledge in the world, as opposed to knowledge in your head. If there is enough knowledge contained within an object itself, the user doesn't have to remember anything to use it. For example, you don't have to remember the exact layout of the buttons on a telephone since the telephone itself contains that information. Which key do you press for the letter A? The correct answer is 2, not 1 as you might guess. But you never have to guess because that information is always available. As Norman puts it: "Why the apparent discrepancy between the precision of behavior and the imprecision of knowledge? Because not all of the knowledge required for precise behavior has to be in the head. It can be distributed—partly in the head, partly in the world, and partly in the constraints of the world."

There are several ways to use constraints in a user interface, but they all involve removing or disabling invalid choices. When you do this, the user doesn't need knowledge about which choices are valid and which are invalid because they are all valid. Note that good constraints do not inhibit the user since they remove only invalid choices. Constraints also eliminate the need for error messages because they make it impossible for the user to make a mistake.

TIP
Good constraints eliminate invalid choices while making the remaining valid choices easier to use.

Types of Constraints

The following constraints are commonly used in user interfaces.

Remove invalid choices

You can constrain the user's choices by disabling or removing choices that don't apply. The user should never be able to select a choice that will only result in an error message. Remove choices in menus or controls that are never valid during an instance of a program; otherwise, disable choices whenever they don't apply. Whenever you give a list of choices, filter out the ones that don't apply to the current context or that the user doesn't care about. For example, you should filter out printer fonts from a list of fonts for the display.

You can also constrain the user's choices by enforcing consistency between controls. Making a selection in one control can enable or disable another control, as well as change its value. A good example is the Settings tab of the Display Control Panel applet, shown on the following page. In this case, selecting more screen area can reduce the number of colors, whereas selecting more colors can reduce the screen area. Note that all selectable combinations are valid.

Constrained controls

Use constrained controls whenever possible. In other words, avoid using edit boxes for anything other than unconstrained text and numeric input. For constrained input, use other controls such as combo boxes, lists, sliders, and spin boxes. Use the date and time picker control for dates and times.

Constrained modes

You can constrain the user by using modes. Modal dialog boxes and wizards are obvious examples. In this case, the user must respond to the modal dialog box or wizard before he can do anything else, which is good if that is the behavior you want.

Another example of constrained modes is the modal tools used by paint programs such as Microsoft Paint. When you select a modal tool, the other tools and their attributes are effectively disabled. While the user can't make an error by setting text attributes when using the pencil, disabling attributes that don't apply serves to make the program less confusing.

Constrained manipulation

While direct manipulation is easy to learn as well as quick and convenient to use, it can make it difficult to manipulate objects precisely. Programs that support direct manipulation often allow you to use the keyboard to obtain precise manipulation. For example, in paint programs it is difficult to get a perfect circle or square. Microsoft Paint uses the Shift key to constraint an object's shape. An oval drawn with the Shift key depressed is a circle, a rectangle is a square, and lines are constrained to be at angles that are multiples of 45 degrees. Tools like dialog box editors allow you to set grids and guides to help obtain consistent control sizing and alignment.

Standards

You can constrain the user's choices by following conventions. In this case, there might be several ways to perform an action, but only one of them is an accepted standard. If all the user's programs follow the standards, the user might not even be aware that alternatives exist. For example, what happens when you press the Page Up key in a document? In all Windows programs (hopefully), the document remains fixed and the window is moved up relative to the document to see what is above the current view. I once used a workstation where pressing the Page Up key kept the window fixed and moved up the document relative to the window, allowing you to see what was below the current view. Were some Windows programs to use the fixed-document approach and others to use the fixed-window approach, users would have to know which technique was used to be able to scroll a document. For another example, the Microsoft Photo Editor doesn't follow the standards since it uses the mouse wheel for zooming instead of scrolling.



Developing User Interfaces for Microsoft Windows
Developing User Interfaces for Microsoft Windows
ISBN: 0735605866
EAN: 2147483647
Year: 2005
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net