Mary Beth Rosson and John M. Carroll
Department of Computer Science
Virginia Polytechnic Institute and State University
Blacksburg, VA 24061-0106 USA
Tel: 1-703-231-6470
E-mail: (rosson,carroll)@cs.vt.edu
KEYWORDS: object-oriented design, scenarios, object-oriented programming, scenario-based design
© Copyright 1996 by Mary Beth Rosson and John M. Carroll
This tutorial introduces OOD to HCI professionals so that they can begin to explore the potential of this new design paradigm for their own research and development activities. Throughout, the focus is on the design of tasks: students begin by specifying and modeling individual scenarios, and then gradually elaborating these into the underlying object-oriented software abstractions. Students are taught to examine the implications of the OO paradigm for both basic application functionality and access to that functionality.
Our introduction to OOD takes a minimalist approach: we involve students in realistic design tasks from the beginning (the tutorial builds on our prior work in building minimalist education for object-oriented design [1, 3, 6]). We teach an approach to OOD that is scenario-based and instance-centered, and that requires little prior understanding of OO concepts. Instead, it leverages a design representation familiar to HCI professionals Q user scenarios. Students are taught to build concrete (instance-based) models of scenarios and analyze these specific contexts to discover useful (and reusable) OO abstractions. The analysis and modeling of scenarios is supported throughout by the Scenario Browser, a Smalltalk tool for scenario-based OOD [4, 5].
Specifying User Scenarios
User scenarios describe one or more users engaged in some meaningful
activity with an existing or envisioned system. As a design
representation, task scenarios reflect concepts and values shared by
many HCI professionals. Thus the specification and analysis of
scenarios serves as a concrete and familiar design task; anchoring
instruction in concrete and familiar activities is a key component of
minimalist instruction. At the same time, the initial focus on user
tasks exploits emerging scenario-based OOD methods.
We use an open-ended design problem -- a Virtual Town Hall (VTH) that supports the archiving and sharing of information, as well as the scheduling and notification of events -- to demonstrate the generation of user scenarios. The focus is on basic-level user interaction scenarios that capture both the activities comprising the task and aspects of how the user experiences these activities.
Analyzing Object Responsibilities
The sample scenarios are modeled as sets of objects. An "underline
the nouns" heuristic is used as a first-pass strategy for identifying
important objects. The Scenario Browser -- a tool coordinating
multiple views (task-centered, object-centered, class-centered,
code-centered) of scenarios -- supports the analysis process.
Students learn to anthropomorphize the objects in a scenario, playing the role of a given object, and thinking about the responsibilities that role entails. A "point-of-view" version of a scenario narrates the scenario from the perspective of a constituent object. These object-centered narrations are a source of information about the knowledge an object must have (its internal state), the relationships it must have with other objects (the objects it must interact with, and what those interactions consist of), and behaviors needed to support these relationships.
Object-Task Interaction
Building an object model of a user scenario can suggest new ways of
thinking about a problem. So, for example, the metaphor of objects as
active agents can suggest functionality that may or may not be
beneficial to the user. In the context of the VTH, conceptualizing a
room in a town building as an active agent that maintains its own
state information (e.g., capacity, A/V, repairs, furniture) raises the
possibility that it ought to be responsible for scheduling events that
will use these resources. Such a model is attractive from the
software perspective, in that it localizes responsibility in the
entity that controls the relevant state; it also allows for future
extensions, such as an articulated hierarchy of "locations" that use
specialized scheduling behaviors. However, a room that "schedules"
departs significantly from an end-user's conceptual model, and we must
consider the pros and cons of making such a software modeling
decision, and whether we should allow this decision to "show through"
in the user interface.
Classes and Superclasses
Scenarios and their asssociated object models provide a concrete and
accessible view of an OO design. However in most cases, this concrete
view must be translated into more abstract constructs; objects modeled
as part of a scenario are normally created as instances of a class.
Classes in turn are normally implemented within a hierarchy, where any
given class inherits the attributes and behaviors of its superclasses.
In constructing class hierarchies, a designer will often include an
abstract class -- a class not intended for instantiation, but rather
to serve as a placeholder for generic shareable attributes and
behavior. Such a class will often specify some of the behavior
expected in its subclasses, but not how the behavior is to be
implemented. This is left to the design of each individual class,
which implements its own, appropriate, version of the behavior. As a
result, one may end up with many quite different versions of a single
generic behavior (e.g., "display"). This condition is known as
polymorphism and can be quite valuable in promoting reuse, as it
allows the same generic message to be sent to different objects with
very different but appropriate effects.
Application Frameworks
Classes and superclasses provide the basic mechanism for reuse in OOD.
In this topic, we introduce a technique for promoting reuse through
the design and application of OO frameworks (a framework is a set of
classes designed to work in concert). We survey several of the
best-known frameworks (e.g., MVC, Hotdraw), but spend most of our time
analyzing and reusing a framework for project management that can be
applied to the VTH example. This example framework includes abstract
classes for acquiring and maintaining group member information,
management of shared resources, and the scheduling and notification of
group events. The framework is itself a specialization of the basic
Smalltalk model-view framework, with a clear separation between the
classes supporting the user interface functionality and the underlying
application.
Summary and Tips
The concepts and techniques covered in the course are summarized and
questions invited. Topics not covered in the tutorial (e.g., common
OO languages; notations; CASE tools; OO texts) are mentioned briefly
and additional reference material is identified.