Task-Centered User Interface Design
A Practical Introduction |
by
Clayton Lewis
and
John Rieman
Copyright ©1993, 1994: Please see the "shareware notice" at the front of the book. |
Contents | | Foreword | | ProcessUsers&Tasks | | Design | | Inspections | | User-testing | | Tools | | Documentation | |
6.1.2 Event-Driven Programs
The traditional paradigm for computer programs is sequential: the user starts the program and the program takes control, prompting the user for input as needed. It's possible to write a highly interactive program (for example, a word processor) using the sequential programming paradigm, but it isn't easy. The resulting programs are often very modal: an input mode, an edit mode, a print mode, etc. The programmer has to anticipate every sequence of actions the user might want to take, and modes restrict those sequences to a manageable set.
For a simpler and more natural approach, modern interactive systems use an event-driven paradigm. Events are messages the user, or the system, sends to the program. A keystroke is an event. So is a mouse-click. Incoming e-mail or an empty paper tray on the printer might cause the system to generate an event. The core of every event-driven program is a simple loop, which waits for an event to take place, responds appropriately to that event, and waits for another. For example, the event loop of a word processor would notice a keystroke event, display the character on the screen, and then wait for another event. If it noticed a mouse-double- click event, it would select the word the mouse was pointing at. If it noticed a mouse-click in a menu, it would take whatever action the menu item specified. Early interactive systems actually required the programmer to write the event loop, but in a modern UIMS environment the programmer just needs to build objects (menus, windows, code, etc.) and specify how they send or respond to messages.
Copyright © 1993,1994 Lewis & Rieman |
Contents | | Foreword | | ProcessUsers&Tasks | | Design | | Inspections | | User-testing | | Tools | | Documentation | |