home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / WISR / wisr6 / proceedings / ascii / daudjee.ascii < prev    next >
Text File  |  1993-10-19  |  14KB  |  316 lines

  1.  
  2.  
  3.  
  4.  
  5. Linguistic  Supp ort  for Reuse  in  the  Development  of  User  Interfaces
  6.  
  7.  
  8.  
  9.                                                Khuzaima S. Daudjee
  10.  
  11.                                            Email: daudjee@cs.yorku.ca
  12.  
  13.  
  14.  
  15.                                               T.C. Nicholas Graham
  16.  
  17.                                            Email: graham@cs.yorku.ca
  18.  
  19.  
  20.  
  21.                                            Dept.  of Computer Science
  22.  
  23.                                                    York University
  24.  
  25.                                                     4700 Keele St.
  26.  
  27.                                                 North York, Ontario
  28.  
  29.                                                 CANADA M3J 1P3
  30.  
  31.  
  32.  
  33.                                                         Abstract
  34.  
  35.  
  36.           User interface development differs from that of traditional software. This paper discusses the
  37.       special linguistic features necessary for supporting reuse in the development of graphical user
  38.       interfaces.  It is shown how limiting the domain of reuse to the user interface leads to stronger
  39.       results than can be achieved for the general reuse case. These ideas have been demonstrated in
  40.       the Clock system [1], a language for the rapid prototyping of graphical user interfaces.
  41.  
  42.  
  43.       Keywords: Rapid prototyping, user interface, object-oriented framework,Clock methodology,
  44.       interactive system.
  45.  
  46.  
  47.       Workshop Goals: Learning; establish better communication with other researchers; exposure
  48.       to other methods of reuse.
  49.  
  50.  
  51.       Working Groups:  Reuse and OO methods,  Tools and environments,  Reusable component
  52.       certification, Reuse and formal methods.
  53.  
  54.  
  55.  
  56.                                                        Daudjee- 1
  57.  
  58.  
  59. 1      Background
  60.  
  61.  
  62.  
  63. Khuzaima S. Daudjee is interested in Software Reuse from various perspectives. He investigated
  64. reuse  in  software  systems  from  a  heuristic search  standpoint  as  a  graduate  course  project.  His
  65. current work is aimed towardreuse based on an ob ject-oriented framework in the Clock language.
  66.  
  67.  
  68. Nicholas Graham has an extensive background in programming language design and implementa-
  69. tion. His most recent work has been the development of Clock, a language for the rapid prototyping
  70. of interactive systems. Clock is intended to support the high-level programming of user interfaces
  71. through  reuse  of  a  palette  of  predefined  components.  The  language  has  been  designed  to  best
  72. support the creation of flexible, reusable components.
  73.  
  74.  
  75.  
  76. 2      Position
  77.  
  78.  
  79.  
  80. Developing modern interactive applications requires a different approach from that of traditional
  81. software  development.  Good  user  interfaces  cannot  be  designed  a priori,  but  must  be  refined
  82. through iterations of rapid prototyping and user testing. The high cost of such iterative design of
  83. user interfaces has led to a need for high-level to ols thatsupp ort therapid prototyping of interactive
  84. software.
  85.  
  86.  
  87. Reuse aids the rapid prototyping of interactive software by raising the level of the basic building
  88. blocks used to construct a system. Programmers work with primitives such as menus, radio buttons
  89. and dialogue boxes, rather than variables and pointers.  This high-level supp ort not only saves the
  90. time required to program the individual components,but also helps the programmer in determining
  91. a high-level structure (or architecture) for the program. Reuse of existing user interface components
  92. additionally helps in enforcing user interface consistency, and adherance to standards.
  93.  
  94.  
  95. Our approach to reuse has been to provide linguistic and architectural support for creating reusable
  96. components.   This  pap er  briefly  discusses  the  major  ideas  behind  this  approach.   Our  current
  97. research  focuses  on  building  libraries  of  reusable  components, and  investigating  a  development
  98. methodology based on reuse.
  99.  
  100.  
  101.  
  102. 2.1     Linguistic Support for Reuse in User Interfaces
  103.  
  104.  
  105.  
  106. The process of user interface development can differ from the development of traditional software.
  107. These differences lead to special requirements for how support for reuseshould b ebuilt into user
  108. interface development languages. Our research has identified three key requirements:
  109.  
  110.  
  111.  
  112.     fflReuse should be based on a black box model;
  113.  
  114.  
  115.     fflReasonable defaults should be provided for component parameters;
  116.  
  117.  
  118.     fflSupport should exist for combining existing components into a user interface architecture.
  119.  
  120.  
  121.  
  122.                                                         Daudjee- 2
  123.  
  124.  
  125. 2.1.1     Black Box Model
  126.  
  127.  
  128.  
  129. In traditional software development, the design of reusable components is highly challenging. For
  130. example, a symbol table designed for one compiler would almost certainly not be directly usable
  131. in another. Even when a programmer attempts to design a component for reuse, it is very difficult
  132. to  anticipate  every  use  to  which the  comp onent  will  be  put,  and  to  provide  all  the  necessary
  133. degrees of freedom in instantiating the component [2].  This has led to an approach called white
  134. box  reusability  [3],  where  comp onents  are  designed  for  reuse  as  best  as  possible,  but  where  an
  135. adaptation process still requires code-level customization of the component.
  136.  
  137.  
  138. In contrast, graphical user interfacestypically consist of a relatively small number of comparitively
  139. well-understood components.  It  is  reasonable  to  expect  to  define  the  basic  components  of  user
  140. interface  development, such  as  menus,  buttons,  dialogue  boxes  and  scroll  bars,  in a  black  box
  141. fashion where the components do not have to be modified to be reused.
  142.  
  143.  
  144.  
  145. 2.1.2     Defaults
  146.  
  147.  
  148.  
  149. One of the problems with black box reuse is that components can have an overwhelming number
  150. of parameters which must be instantiated before the componentcan b e used.  Understanding all
  151. the parameters and instantiating them can place an unreasonable burden on the component user.
  152. Consider, for example, a component implementing a radio  button behaviour (radio buttons have
  153. the  property  that  exactly  one  of  a  set  of  buttons  can  be  selected  at a  given  time.)   Potential
  154. parameters include: the buttons themselves, which button is initially selected, how the buttons are
  155. to be positioned, and how the component is to report the selection of a new button.
  156.  
  157.  
  158. In a rapid prototyping context, the programmer may not be initially interested in the details of all
  159. of these parameters, but may be willing to put up with some reasonable,but p ossibly incorrect,
  160. default value. For example, a programmer might wish to lay out a list of radio buttons in a circular
  161. clock face, but be willing to accept a horizontal layout as a first approximation.   It is therefore
  162. important for a language to permit the attribution of default values to components, and to provide
  163. an easy mechanism for overriding the defaults.
  164.  
  165.  
  166. In traditional software,the automatic use of defaults may lead to incorrect behaviour that is hard to
  167. track down. In user interfaces, however, the incorrect nature of a default will usually be immediately
  168. visible on the display: a button may be square instead of rounded, a menu might be in the wrong
  169. font, an alert box may not display the correct message.  Such details are often unimp ortant in the
  170. early versions of a user interface, and can be specialized at any time.
  171.  
  172.  
  173.  
  174. 2.1.3     Support for Architecture Design
  175.  
  176.  
  177.  
  178. The  use  of  predefined  components  raises  the  level  of user  interface  construction.   Ideally,  user
  179. interfaces could be constructed completely by connecting together predefined components.  This
  180. approach not only saves the time of reco ding thereused components, but also aids in the design of
  181. user interface architectures. In general, user interface architectures must support ease of modifica-
  182. tion and possess clear separation of concerns and communication structures.  Such design is difficult
  183. to achieve, especially in a rapid-prototyping context where the user interface itself is not fully spec-
  184. ified before implementation begins.  The availability of well-designed, high-level components aids
  185. in creating a well-structured architecture.
  186.  
  187.  
  188.  
  189.                                                         Daudjee- 3
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Figure 1:  A Clock architecture for a card file name and address program, and the resulting user
  196. interface
  197.  
  198.  
  199.  
  200. 2.2     Our Approach
  201.  
  202.  
  203.  
  204. The previous section identified three key requirements for reuse mechanisms in the development of
  205. user interfaces. Within the Clock [1] language, we attempt to meet each of these three requirements.
  206. Clock programs consist of a tree of components,structured in an object-oriented style. Components
  207. themselves are coded in a high-level, purely functional language.  Figure 2.2 shows an example of a
  208. name and address card file program, and the Clock architecture that implements it.
  209.  
  210.  
  211. Communication between components is based on a mechanism of updates and requests.  These may
  212. only travel up the tree, meaning that components can know what data exists above them, but not
  213. below.  This leads to a general prop erty where component subtrees can be replaced by any other
  214. subtree matching the same request/update interface,while being guaranteed not to require changes
  215. to any other part of the architecture.
  216.  
  217.  
  218. Predefined components are designed to be used in a black-box fashion. For example, the Pushable
  219. component adds a push-button behaviour to whatever object appears below it in the tree. Compo-
  220. nents may be parameterized. The language provides a natural mechanism for setting defaults for
  221. these parameters. The defaults may then be overridden at either the architecture or the program
  222. level.
  223.  
  224.  
  225. Clock provides a mechanism of invariant functions that allows components to specify consistency
  226. conditions that are automatically maintained. These invariant functions simplify the communica-
  227. tion structures between components, making it easier to combine and replace existing components
  228. in an architecture.
  229.  
  230.  
  231.  
  232. 2.3     Comparison
  233.  
  234.  
  235.  
  236. A number of user interface toolkits support some form of reuse. InterViews [4 ] is a toolkit based
  237. on an object-oriented framework [5].  InterViews supports ob jectcategories where each category is
  238. a hierarchical structure of object classes within a common class. Reuse is facilitated by allowing
  239. objects to be composed from various subclasses. InterViews is intended for producing production
  240. quality user interfaces, and therefore does not include higher-level features used in Clock to ease
  241. reuse. In particular, InterViews has no equivalent to Clock's invariant functions.
  242.  
  243.  
  244. Garnet [6] is a toolkit intended for rapid prototyping of user interfaces. Garnet provides interactors
  245.  
  246.  
  247.  
  248.                                                         Daudjee- 4
  249.  
  250.  
  251. based on the MVC [7] model, where the interactors correspond to the controller,the ob ject-oriented
  252. graphics correspond to the view, and the code is the model.  Constraints in Garnet are used to
  253. link the model, view and controller parts, giving a functionality similar to Clock's invariants. The
  254. inheritance  mechanism  can  be  used  to  set  and  override  default  values  on  components.  Garnet
  255. differs from Clock in that Garnet is a more general system, where structuring programs for reuse
  256. is a matter of discipline; in Clock, the meansof structuring architectures is built into the language.
  257.  
  258.  
  259.  
  260. References
  261.  
  262.  
  263.  
  264. [1]  T.  N.  Graham,  "Constructing  user  interfaces  with  functions  and  temporal  constraints,"  in
  265.      Languages for Developing User Interfaces (B. A. Myers, ed.), Jones and Bartlett, 1992.
  266.  
  267.  
  268. [2]  R. Johnson andB. Foote, "Designing Reusable Classes," Journal of Object-Oriented Program-
  269.      ming, vol. 2, pp. 22-35, June/July 1988.
  270.  
  271.  
  272. [3]  C. W. Krueger,"Software Reuse," ACM Computing Surveys, vol. 24, June 1992.
  273.  
  274.  
  275. [4]  M. Linton,  J. Vlissides,  and P. Calder,  "Composing User Interfaces with InterViews," IEEE
  276.      Computer, pp.8-22, February 1989.
  277.  
  278.  
  279. [5]  R.  E.  Johnson  and  V.  F.  Russo,  "Reusing  Object-Oriented  Designs,"  Tech.  Rep.  UIUCDCS
  280.      91-1696, University of Illinois, May 1991.
  281.  
  282.  
  283. [6]  B.  Myers,  D.  Guise,  R.  Dannenberg,  B.  V.  Zanden,  D.  Kosbie,  P.  Marchal,  and  E. Pervin,
  284.      "Comprehensive  Support  for  Graphical,  Highly  Interactive  User  Interfaces:  the  Garnet  user
  285.      interface development environment," IEEE Computer, November 1990.
  286.  
  287.  
  288. [7]  G. Krasner andS. Pope,  "A description of the model-view-controller user interface paradigm
  289.      in the Smalltalk-80 system," J. Object Oriented Programming, vol. 3, pp. 26-49, August 1988.
  290.  
  291.  
  292.  
  293. 3      Biography
  294.  
  295.  
  296.  
  297. Khuzaima  S.  Daudjee  is  currently  pursuing an  M.Sc.   degree  in  Computer  Science  at  York
  298. University,  Toronto,  Canada.  His  Masters's  thesis  is  targeted  toward  software  reuse  in to olkits
  299. and UIMSs.  His interests include software engineering, user interface technology, object-oriented
  300. systems and computer-supported cooperative work.  He holds a B.Sc.(Hons) degree in Computer
  301. Science from Trent University.
  302.  
  303.  
  304. Nicholas Graham is an Assistant Professor at York University, working in the field of tools and
  305. methodologies for user interface development. Most recently, he has developed the Clock system [1],
  306. a rapid-prototying language for user interfaces that supp orts reuse of user interface components. He
  307. has worked in language and programming environment development on the Turing Language project
  308. at the University of Toronto, as a Research Associate on the T'Nial compiler project at Queen's
  309. University, Canada, and was a visiting researcher at the German National Research Institute for
  310. Computer Science (GMD) in Karlsruhe, Germany.  Graham's forthcoming Ph.D. is expected from
  311. the Technische Universit{t Berlin, Germany.
  312.  
  313.  
  314.  
  315.                                                         Daudjee- 5
  316.