\markboth{Daudjee}{Daudjee}
\documentstyle[11pt]{article}

\oddsidemargin  0.26in % Leave enough for binding margin
\evensidemargin 0.26in %
\topmargin      -1.00in % (adjusted for printer bias)
\headheight      .00in  % (no headers)
\headsep         .75in  % (top margin + headers + skip)
\footheight     12.0pt  % ??? (seems to work ok)
\footskip       25.0pt  % ??? ( "   "  )
\textheight     9.425in % (instructions: 9 1/8" min, 9 7/16" max)
\textwidth      6.5in   %

\markboth{Daudjee}{Daudjee}
\pagestyle{myheadings}

\parindent=0pt
\parskip=10pt
%
% can make the title box even smaller
%
\def\@maketitle{\vbox to 2.6in{\hsize\textwidth
    \linewidth\hsize \vfil \centering
    {\large \@title \par}
    \vskip 2em
    {\normalsize
    \begin{tabular}[t]{c}\@author
    \end{tabular}\par}
    \vfil}
}

\input{epsf}
\begin{document}

%\bibliographystyle{plain}
\bibliographystyle{ieeetr}

\title{Linguistic Support for Reuse in the Development of User Interfaces}

\author{Khuzaima S. Daudjee\\
Email: daudjee@cs.yorku.ca\\
\\
T.C. Nicholas Graham\\
Email: graham@cs.yorku.ca\\
\\
Dept. of Computer Science\\
York University\\
4700 Keele St.\\
North York, Ontario\\
CANADA M3J 1P3\\
}
\date{}

\maketitle

\begin{abstract}
User interface development differs from that of traditional software.
This paper discusses the special linguistic features necessary for supporting
reuse in the development of graphical user interfaces.  It is shown how
limiting the domain of reuse to the user interface leads to stronger results
than can be achieved for the general reuse case. These ideas have been
demonstrated in the {\em Clock} system~\cite{myers:Graham1992}, a
language for the rapid prototyping of graphical user interfaces.

\vspace{0.2in}
\noindent
{\bf Keywords:} Rapid prototyping, user interface, object-oriented
framework, Clock methodology, interactive system.

\vspace{0.2in}
\noindent
{\bf Workshop Goals:} Learning; establish better communication with other
researchers; exposure to other methods of reuse.

\vspace{0.2in}
\noindent
{\bf Working Groups:} Reuse and OO methods, Tools and environments,
Reusable component certification, Reuse and formal methods.

\end{abstract}

\newpage

\section{Background}
{\bf Khuzaima S. Daudjee} is interested in Software Reuse from various
perspectives. He investigated reuse in software systems from a heuristic search
standpoint as a graduate course project. His current work is aimed toward reuse
based on an object-oriented framework in the Clock language.

{\bf Nicholas Graham} has an extensive background in programming language
design and implementation.  His most recent work has been the development
of {\em Clock}, a language for the rapid prototyping of interactive systems.
Clock is intended to support the high-level programming of user interfaces
through reuse of a palette of predefined components.  The language has been
designed to best support the creation of flexible, reusable components.

\section{Position}
Developing modern interactive applications requires a different approach
from that of traditional software development.  Good user interfaces cannot
be designed {\em a priori}, but must be refined through iterations of rapid
prototyping and user testing.  The high cost of such iterative design of user
interfaces has led to a need for high-level tools that support the rapid
prototyping of interactive software.

Reuse aids the rapid prototyping of interactive software by raising the level
of the basic building blocks used to construct a system.  Programmers work
with primitives such as menus, radio buttons and dialogue boxes, rather than
variables and pointers.  This high-level support not only saves the time
required to program the individual components, but also helps the
programmer in determining a high-level structure (or {\em architecture})
for the program.  Reuse of existing user interface components additionally
helps in enforcing user interface consistency, and adherance to standards.

Our approach to reuse has been to provide linguistic and architectural
support for creating reusable components.  This paper briefly discusses
the major ideas behind this approach.  Our current research focuses on
building libraries of reusable components, and investigating a development
methodology based on reuse.

\subsection{Linguistic Support for Reuse in User Interfaces}
The process of user interface development can differ from the development
of traditional software.  These differences lead to special requirements
for how support for reuse should be built into user interface development
languages.  Our research has identified three key requirements:

\begin{itemize}
\item Reuse should be based on a black box model;
\item Reasonable defaults should be provided for component parameters;
\item Support should exist for combining existing components into a user
interface architecture.
\end{itemize}

\subsubsection{Black Box Model}
In traditional software development, the design of reusable components is
highly challenging.  For example, a symbol table designed for one compiler
would almost certainly not be directly usable in another.  Even
when a programmer attempts to design a component for
reuse, it is very difficult to anticipate every use to which the
component will be put, and to provide all the necessary degrees of freedom
in instantiating the component~\cite{johnson88}. This has led to an
approach called {\em white box} reusability~\cite{krueger92}, where
components are designed for reuse as best as possible, but where an
adaptation process still requires code-level customization of the
component.

In contrast, graphical user interfaces typically consist of a relatively small
number of comparitively well-understood components.  It is reasonable to
expect to define the basic components of user interface development, such
as menus, buttons, dialogue boxes and scroll bars, in a {\em black box}
fashion where the components do not have to be modified to be reused.

 \subsubsection{Defaults}
One of the problems with black box reuse is that components can
have an overwhelming number of parameters which must be instantiated
before the component can be used.  Understanding all the parameters and
instantiating them can place an unreasonable burden on the component user.
Consider, for example, a component implementing a {\em radio button}
behaviour (radio buttons have the property that exactly one of a set of
buttons can be selected at a given time.)  Potential parameters include:  the
buttons themselves, which button is initially selected, how the buttons are
to be positioned, and how the component is to report the selection of a new
button.

In a rapid prototyping context, the programmer may not be initially
interested in the details of all of these parameters, but may be willing to
put up with some reasonable, but possibly incorrect, default value.  For
example, a programmer might wish to lay out a list of radio buttons in a
circular clock face, but be willing to accept a horizontal layout as a first
approximation.  It is therefore important for a language to permit the
attribution of default values to components, and to provide an easy
mechanism for overriding the defaults.

In traditional software, the automatic use of defaults may lead to
incorrect behaviour that is hard to track down.  In user interfaces,
however, the incorrect nature of a default will usually be immediately
visible on the display:  a button may be square instead of rounded, a menu
might be in the wrong font, an alert box may not display the correct
message.  Such details are often unimportant in the early versions of a
user interface, and can be specialized at any time.

\subsubsection{Support for Architecture Design}
The use of predefined components raises the level of user interface
construction.  Ideally, user interfaces could be constructed completely by
connecting together predefined components.  This approach not only saves
the time of recoding the reused components, but also aids in the design of
user interface architectures.  In general, user interface architectures must
support ease of modification and possess clear separation of concerns and
communication structures.  Such design is difficult to achieve, especially in
a rapid-prototyping context where the user interface itself is not fully
specified before implementation begins.  The availability of well-designed,
high-level components aids in creating a well-structured architecture.

\subsection{Our Approach}
\begin{figure}
\centering
\leavevmode\hbox{\epsfbox{daudjee-fig1.ps}}
%\leavevmode\hbox{\epsfbox{test}}
%  \vspace{2.2in}
%  \special{picture card scaled 400}
  \label{fig:card}
  \caption{A Clock architecture for a card file name and address program, and
the resulting user interface}
\end{figure}

The previous section identified three key requirements for reuse
mechanisms in the development of user interfaces.  Within the {\em
Clock}~\cite{myers:Graham1992} language, we attempt to meet each of
these three requirements. Clock programs consist of a tree of components,
structured in an object-oriented style.  Components themselves are coded in
a high-level, purely functional language.  Figure~\ref{fig:card} shows an
example of a name and address card file program, and the Clock architecture
that implements it.

Communication between components is based on a mechanism of updates and
requests.  These may only travel up the tree, meaning that components can
know what data exists above them, but not below.  This leads to a general
property where component subtrees can be replaced by any other subtree
matching the same request/update interface, while being guaranteed not to
require changes to any other part of the architecture.

Predefined components are designed to be used in a black-box fashion.  For
example,  the {\em Pushable} component adds a push-button behaviour to
whatever object appears below it in the tree.  Components may be
parameterized.  The language provides a natural mechanism for setting
defaults for these parameters.  The defaults may then be overridden at
either the architecture or the program level.

Clock provides a mechanism of {\em invariant functions} that allows
components to specify consistency conditions that are automatically
maintained.  These invariant functions simplify the communication
structures between components, making it easier to combine and replace
existing components in an architecture.

\subsection{Comparison}
A number of user interface toolkits support some form of reuse.
InterViews~\cite{linton89} is a toolkit based on an object-oriented
framework~\cite{johnson91}. InterViews supports object categories where
each category is a hierarchical structure of object classes within a common
class. Reuse is facilitated by allowing objects to be composed from various
subclasses. InterViews is intended for producing production quality user
interfaces, and therefore does not include higher-level features used in
Clock to ease reuse.  In particular, InterViews has no equivalent to Clock's
invariant functions.

Garnet~\cite{myers90b} is a toolkit intended for rapid prototyping of user
interfaces. Garnet provides {\em interactors} based on the
MVC~\cite{krasner88} model, where the interactors correspond to the
controller, the object-oriented graphics correspond to the view, and the code
is the model. Constraints in Garnet are used to link the model, view and
controller parts, giving a functionality similar to Clock's invariants.  The
inheritance mechanism can be used to set and override default values on
components.  Garnet differs from Clock in that Garnet is a more general
system, where structuring programs for reuse is a matter of discipline; in
Clock, the means of structuring architectures is built into the language.

\bibliography{daudjee}

\section{Biography}
{\bf Khuzaima S. Daudjee} is currently pursuing an M.Sc. degree in Computer
Science at York University, Toronto, Canada. His Masters's thesis is targeted
toward software reuse in toolkits and UIMSs. His interests include software
engineering, user interface technology, object-oriented systems and
computer-supported cooperative work. He holds a B.Sc.(Hons) degree in
Computer Science from Trent University.

{\bf Nicholas Graham} is an Assistant Professor at York University, working
in the field of tools and methodologies for user interface development.  Most
recently, he has developed the {\em Clock} system~\cite{myers:Graham1992}, a
rapid-prototying language for user interfaces that supports reuse of user
interface components.  He has worked in language and programming
environment development on the Turing Language project at the University
of Toronto, as a Research Associate on the T'Nial compiler project at
Queen's University, Canada, and was a visiting researcher at the German
National Research Institute for Computer Science (GMD) in Karlsruhe,
Germany. Graham's forthcoming Ph.D. is expected from the Technische
Universit{\"a}t Berlin, Germany.
\end{document}
