Abstract
The tutorial takes a minimalist approach to introducing object-oriented design (OOD): Students begin
working on design projects immediately, creating object models of user task scenarios, and elaborating
these models throughout the day to develop a complete design. The students learn methods of
responsibility-driven design, as well as how to generalize from a single problem to support class and
framework reuse.
Keywords
: object-oriented design, object-oriented programming, scenario-based design
Introduction
Many of the benefits claimed for OOD for example, that object abstractions provide a natural mapping for
the structure of a domain, and that decomposing a problem into objects results in stable but extendable
domain models [2] have particular attraction to the developers of interactive applications, in that a key
aspect of designing such systems is the creation of a task model that is accessible to users but also
extensible as users' needs evolve.
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.
A Minimalist Approach to Teaching OOD
In a typical introductory OOD course, many concepts and definitions are presented first (e.g., what objects
and classes are, inheritance, encapsulation, polymorphism, and so on), followed by an introduction to
particular representational schemes (i.e., design notations), and practice at classifying objects in various
domains. Only after considerable preparatory material are students guided through exercises involving the
design of actual applications.
In this minimalist introduction to OOD, 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
do this by teaching 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 task 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].
Tutorial Content
The course begins with a brief orientation to the topic of OOD and to our approach to teaching the material.
We then cover a number of design topics; in each topic a specific design activity is demonstrated and
practiced; we also provide relevant references for each topic.
Specifying Task Scenarios
Task scenarios describe a user 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.
Several sample applications are used to introduce scenarios: a car service shop, a bibliography utility, an
org chart, a blackjack game. 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.
Identifying Important Objects
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.
Assigning Object Responsibilities
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.
Building Scenario Scripts
A key contribution of scenarios to OOD is that they provide a specific context in which designers can
analyze object interactions. This provides a view into the design's "flow of control" which is explicit in
procedural designs but is distributed across objects in OOD. Here, the sample scenarios are decomposed
into individual interactions, converting the "relationships" identified before into specific message sends,
along with whatever information is required to carry out each request. The result is a set of "scripts" that
can be hand-simulated to test the emerging design.
Exploiting Shared Information
The scenario-specific object models are analyzed for commonalities among instances. Based on our
findings, we identify what is shared (structure and behavior) and in what way the instances differ from one
another (actual data values); classes are created to capture this shared information. A similar process of
generalizing across classes introduces the notions of hierarchy and inheritance.
Analyzing Object Roles
Using the behaviors designed for objects in the sample scenarios, several different roles that an object may
take on are exemplified: coordinator, structurer, controller, etc. We make the key distinction between
"model" objects and "user interface" objects, showing how our focus thus far has been on model objects and
why this is a reasonable approach to doing OOD. Various user interface objects that might be incorporated
into the sample scenarios are considered.
Evolving an Object Abstraction
The sample scenarios are analyzed for two conditions often prompting the refactoring of objects resolution
of inconsistencies (similar objects have been modeled in slightly different ways in different scenarios), and
pruning of objects (too much responsibility has been encapsulated within a single abstraction). The object
evolution mechanisms built into the Scenario Browser are used to demonstrate possible object refactorings.
Supporting Reuse by Composition
User interface components in the Smalltalk hierarchy are analyzed to see how their design promotes
"pluggability". We then enhance the reusability of the user interface components modeled in the sample
scenarios, by pulling out context-specific information and providing that information via message
arguments.
Supporting Reuse by Inheritance
The Smalltalk hierarchy is used to exemplify the notions of abstract classes and polymorphism Abstract
classes that could be built in support of the sample scenarios are demonstrated, with discussion of how such
abstractions benefit designers of other applications. Application frameworks are introduced and the model-
view-controller framework for managing user interfaces is explored.
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.
References
1. Robertson, S. P., Carroll, J. M., Mack, R. L., Rosson, M. B., Alpert, S. R., and Koenemann-Belliveau, J.
ODE: An Object Design Exploratorium, in OOPLSA '94: Object-Oriented Programming, Systems and
Applications. 1994. New York, NY: ACM.
2. Rosson, M. B. and Alpert, S. R. Cognitive consequences of object-oriented design. Human-
Computer Interaction 5, (1990), 345-379.
3. Rosson, M. B. and Carroll, J. M. Developing Minimalist Education for Object-oriented Programming
and Design (Tutorial), in OOPLSA '93: Object-Oriented Programming, Systems and Applications.
1993. New York, NY: ACM.
4. Rosson, M. B. and Carroll, J. M. Extending the task-artifact framework: Scenario-based design of
Smalltalk applications, in Advances in Human-Computer Interaction, ed. H.R. Hartson and D. Hix.
1993, Ablex: Norwood, NJ. pp. 31-57.
5. Rosson, M. B. and Carroll, J. M. Integrating task and software development for object-oriented
applications, in Human Factors in Computing Systems, CHI '95 Conference. 1995. New York,
NY: ACM.
6. Rosson, M. B., Carroll, J. M., and Bellamy, R. K. E. Smalltalk scaffolding: A case study in Minimalist
instruction, in Human Factors in Computing Systems, CHI '90 Conference. 1990. New York, NY:
ACM, pp. 423-429.