Using XML in a generic model of mediators   Table of contents   Indexes   Evaluating Content Management Systems Based on Information Chunk Size

Abrams, Marc
 Blacksburg 
Computer Science Department, Virginia Tech
 USA 
 
Marc Abrams
 Associate Professor
Computer Science Department, Virginia Tech
 Mail Code 0106 Blacksburg (Virginia)  USA (24061)
Email: Abrams@vt.edu
 Biography
 Marc Abrams is an associate professor in Computer Science at Virginia Tech. His research thrust is to facilitate access via new types of information appliances to computer information systems, with a particular emphasis on wireless data access. Dr. Abrams co-developed the User Interface Markup Language, UIML, and is editor of World Wide Web: Beyond the Basics (Prentice Hall, 1998).
 Blacksburg 
 Phanouriou, Constantinos 
 USA 
Universal Interface Technologies
 
Constantinos Phanouriou
 Ph.D. Candidate
Universal Interface Technologies
 P.O.Box 0825 Blacksburg (Virginia)  USA (24063-0825)
Email: phanouri@universalit.com Web site:http://www.universalit.com/
 Biography
UIML
 User Interface 
 XML 
handheld devices
mobile devices
 
Constantinos Phanouriou is a Ph.D. candidate in Computer Science at Virginia Tech. He is also a co-founder of Universal Interface Technologies and co-developed the User Interface Markup Language, UIML. His research focuses on markup languages for user interfaces.
 

Abstract

  This paper discusses the User Interface Markup Language (UIML), an XML language that permits a declarative description of a user interface in a highly device-independent manner. An objective of UIML is to permit a UIML document to be mapped to any type of user interface, from graphical to speech, and even to those not yet invented. UIML represents an interface in five parts: the interface structure, presentation style, content (words, images, sounds), actions taken in response to user interaction, and interconnection of the interface to application logic. This paper highlights two aspects of UIML: the ability to generate user interfaces for different platforms (we give example for Java AWT, WML, and VoiceXML), and the ability to construct a library of reusable interface components.
 

Introduction

  The desktop computer is now being augmented with a new breed of information devices. Handheld devices and voice-telephones are increasingly being used to deliver user interfaces while allowing access to server-based applications from nearly anywhere. There are currently more than 75 million handheld communications devices, and many have gone beyond the one-way delivery of weather updates, news headlines, and stock quotes to offer more interactivity, such as access to bank accounts, travel reservations, and email.
  In the market today there are four categories of devices that can run a computer-generated user interface: desktop computers, palmtop and handheld computers, smart-phones, and traditional voice phones. The desktop is familiar to all: computers with graphical displays, ample memory and computing power, voice capabilities, and the ability to download, store, and run executable code (e.g., a Java-applet, Active-X). In contrast, handheld devices have small displays and limited computing power, but they usually allow loading of small executable code segments (e.g., apps must be broken into small segments that are downloaded on demand). Smart-phones have even smaller displays, a few lines of text, little or no processing power, and no downloading of code. Finally, voice devices use speech synthesis or recorded sounds for output and voice recognition for input. Devices in new categories are expected to emerge in the near future, such as 3D-immersive and natural language environments.
 

Problems faced by UI Implementers

  User Interfaces are implemented with an increasing number of software and hardware technologies. Although this is great news for consumers, UI implementers must deal with a number of problems. For example, developers must learn multiple implementation languages: Wireless Markup Language (WML) [1] for handheld wireless devices, C++ with specific application programming interfaces for certain operating systems (e.g., WindowsCE or PalmOS), and so on. Making matters worse is that each language evolves over time, requiring developers to track changes to multiple languages. Furthermore, developers must maintain multiple bodies of "source code" in each implementation language. This complicates achieving consistency across devices.
 

Markup Languages for Graphical User Interfaces (GUIs)

  PCs with high-resolution screens and sufficient memory and CPU can support many types of user interaction (e.g., direct manipulation). GUIs are rich interfaces that employ widgets such as windows, icons, and menus to interact with the user. Markup languages for GUIs (e.g., HTML [3]) describe the presentation and layout of the screen, and use a scripting language to specify the runtime behavior.
 

Markup Languages for Handheld and Wireless

  Markup languages for handheld or wireless devices address the fact that screen size, input capability, and bandwidth are limited. CompactHTML [2] is a subset of HTML [3] for small devices (smart phones, PDAs, etc.). WML now being standardized by the WAP Forum and is intended for specifying user interfaces for narrow-band devices (e.g., cellular phones and pagers).
 

WML

  The Wireless Application Protocol (WAP) Forum's WML will be used as an example in this paper. WML specifies content and user interfaces for handheld devices with wireless network connections, including cellular phones and pagers. WML uses the "deck of cards" metaphor to specify a user interface. The user navigates through a set of cards, logically grouped as a deck, and interacts with the widgets (e.g., a menu or a text field) layout inside each card. WML includes text and image support, formatting (bold, italics, underline, big, and small) and layout (line break, table). WML also includes a rich set of runtime features, including inter-card navigation and linking, event handling, and string parameterization.
 

Markup Languages for Voice

  There are many situations where voice is the best way to communicate with an application, for example, in using an application while driving or while operating certain industrial machinery. Currently, there are two markup languages for conversational applications: SpeechML [4] and VoxML [5]. SpeechML, developed by IBM, describes an application in terms of pages, bodies, menus, and forms. VoxML, developed by Motorola, describes an application in terms of dialogs and steps. These two languages are now being combined into a new markup language, VoiceXML [6], being standardized by the VoiceXML Forum.
 

VoiceXML

  VoiceXML will be used as an example in this paper. VoiceXML is a markup language for specifying interactive voice response applications. It is designed for creating audio dialogs that feature synthesized speech, digitized audio, recognition of spoken and Dual-Tone Multi-Frequency (DTMF) key input, recording of spoken input, telephony, and mixed-initiative conversations.
 

Device-Independent Markup

  Like other markup languages, UIML gives a declarative description of the interface, answering the what question. In contrast a programming language, such as Java or C++, or a scripting language, such as JavaScript, is an imperative language, and gives an algorithm to describe how to implement the functionality of the interface.
  A declarative language is more abstract that an imperative language. A higher level of abstraction helps portability across devices and operating systems. In the late 1950's and early 1960's application implementation languages evolved from machine and assembly language to high level languages (e.g., FORTRAN, COBOL) and gained portability across processors and operating systems. We argue that user interfaces should evolve into a higher abstraction (namely, device-independent markup) to permit interfaces to be portable across devices and operating systems. This is a guiding principle for UIML. It is also the motivation for modularization in XHTML [14].
 

Terminology

  Before discussing UIML, some terminology will be needed. Until now we have referred to various devices, such as phones or palm PCs. AUser Interface Toolkit is the markup language or software library upon which an application's user interface runs. Note that we use the word "toolkit" in a more general sense than its traditional use, because we include markup languages that are capable of representing user interfaces. Examples of toolkits include Java AWT, Java Swing, Microsoft Foundation Classes, WML, HTML and XHTML, and SpeechML. A platform is a combination of a device, an operating system (OS), and a user interface toolkit. An example is a PC running Windows NT using the Java Swing toolkit, or a cellular phone running a manufacturer-specific OS and a WML renderer. A UI widget is a primitive building block provided by a user interface toolkit. The term "widget" is traditionally used in conjunction with a graphical user interface (e.g., a pull-down list), but we use it in a more general sense to apply to any type of user interface (e.g, a page in WML). The user interface along with the underlying logic that implements the functionality visible through the interface is called theapplication . The application logic is code that is part of the application but not part of the user interface.
 

User Interface Markup Language

 

UIML - Purpose

  UIML is a universal, device-independent markup language. It insulates the interface designer from the peculiarities of different devices through style elements. The motivation for and uses of UIML are discussed further in Abrams et al [7]. Briefly, UIML is designed to
 
  •  provide a natural separation between user interface code and non-interface code,
  •  facilitate reuse by non-programmers,
  •  reduce the time to develop user interfaces for multiple device families,
  •  permit rapid prototyping of user interfaces,
  •  facilitate internationalization and localization,
  •  allow efficient download of user interfaces over networks to Web browsers,
  •  enhance security, and
  •  allow extensible to support future technologies.
 

Deploying UIML

  A UIML document can be used in one of several ways. First, it can be stored on a server (see Figure 1). When a user invokes an application, the UIML document either is compiled to a target platform's language (e.g., to WML, or to C++), or it is interpreted while the user interacts with the interface. Interpretation is what a Web browser does with HTML. Compilation on the server side is mandatory for devices that cannot download applications, such as cellular phones, and where memory is limited. Interpretation is more flexible; for example our Java interpretive renderer permits the entire UIML interface to appear as a Java bean, so that the interface may be manipulated programmatically by the application logic. UIML can also be used without a server; in this case UIML or the compiled code or markup language is installed along with the application logic on end-user devices. At runtime, the rendered interface directly communicates with the application logic.
 
  An advantage of running an interpreter on the client side is that it avoids the need to send bulky executable code to devices. For example, Java applets today are time consuming to load over the Internet. In contrast, a Java interpretive renderer installed on a desktop computer requires only UIML to be transmitted over the Internet. UIML is a small text file compared to the equivalent executable code, just as a form in HTML requires less bytes than a Java applet implementing the same form.
  Another advantage of sending UIML instead of executable code over networks is security. UIML is a declarative language, which means it describes what needs to happen but not how it happens. Thus, UIML itself, like HTML, is less likely to contain a virus or launch an attack on a client than executable code. However, scripting or interconnection to application logic used with UIML (just as HTML used with client scripting or CGI scripts) is vulnerable to viruses or attack.
 

UIML - Main Elements

  There are five main elements in a UIML document:
 
  1.  Structure element : A user interface description in UIML includes an enumeration of the set of interface parts comprising the interface. Each part is given an instance name and a class name. The instance name uniquely identifies that part, and the class name identifies the instance as being an element of a certain class. The user interface implementor is free to choose whatever names and classes are most meaningful to him/her. (The element and class names are mapped to widgets in the platform to which the interface will be deployed through a style element, described below.) The enumeration of parts is given in a hierarchical form, to designate the logical structure of the interface. Multiple hierarchies or structures may be given that are appropriate for different families of devices (see [7] for more information). For example, one hierarchy might apply to a family of cellular phone interfaces, the individual members of which vary in screen sizes. Another hierarchy might apply to desktop computers.
  2.  Content element : Unlike other markup languages, a UIML document specifies the content (e.g., text, sounds, images) of the interface in a separate XML element. This facilitates internationalization and creation of user interfaces with varying wording (e.g., for expert versus novice users), and facilitates accessibility. The content of interface parts can also be set programmatically by the application code behind the user interface.
  3.  Behavior element : The behavior of the interface when the user interacts with it (e.g., what happens when a user presses a button) is described by enumerating a set of conditions and associated actions. This is motivated by rule-based systems. Whenever a condition is true, the associated action is performed. UIML limits conditions to include events to avoid expensive implementations (e.g., continuous polling to determine when a condition holds). Actions can be internal to the UIML document, specifying a change in a property's value, or external, invoking a function in a script, program, or object. A unique aspect of UIML is that events are also described in a device-independent fashion, by giving each event a name and identifying the class to which it belongs. As we discussed for parts, the user interface implementor uses instance and class names of his/her choice for events, and those names are mapped to an event in the underlying platform in the style element. For example, the user might use the class "selection," and the style element for a graphical user interface maps "selection" to a mouse click.
  4.   Events can be local (between interface parts) or global (between interface parts and components that represent the application logic). In UIML, the application logic is represented as a collection of components with a well-defined programming interface. These components can be internal (e.g., scripting embedded into a UIML document) or external (e.g., executable code on the local machine or on a remote server).
  5.  Style element : The UIML description also includes a style element, which specifies presentation style that is device-specific for each class of interface parts, or for individual named instances of a class, which is similar in principle to CSS. The style element specifies the mapping of interface parts to a vocabulary of names of user interface widgets in the platform to which the user interface will be mapped (e.g., a scrollable selection list). Unlike style sheets used with HTML, the style element also represents the mapping of event names and classes to events on the underlying platform.
  6.  Peers element : Finally, UIML includes a peers element, which specifies what widgets in the target platform and what methods or functions in scripts, programs, or objects in the application logic are associated with the user interface.
 

UIML as a meta-language

  UIML can be viewed as a meta- or extensible language, analogous to XML. UIML does not contain tags specific to a particular user interface toolkit (e.g., <WINDOW> or <MENU>). Instead, it uses a set of generic tags (e.g., <part>, <property>).
  As discussed earlier, UIML captures the elements that are common to any user interface: an enumeration of the user interface parts, events that occur for those parts, presentation style, content, and interconnection to application logic. The UIML author specifies instance and class names of their own choice for interface parts and events. These names are mnemonics for the interface implementor. The UIML document specifies a mapping of those names to a vocabulary specific to a particular target platform. For example, if the target is Java AWT, the vocabulary might consist of the java.awt and java.awt.event class names, such asFrame , Menu , and Button . If the target is WML, the vocabulary might be tag names, such ascard . The vocabulary of target platforms is not a part of UIML. That vocabulary only appears in UIML as the value of attributes in UIML. Thus UIML only needs to be standardized once, and different constituencies of users can define vocabularies that are suitable for various toolkits independently of UIML. In addition to creating vocabularies for particular toolkits (e.g., Java AWT), a vocabulary for a generic classes of toolkits (e.g., mapping to any graphical user interface) could be devised. Or new vocabularies can be defined as new devices and user interface technologies are created in the future.
  To illustrate, the interface implementor might write this in UIML:
 
<part name="Line" class="MenuItemOrIcon">
  The nameMenuItemOrIcon is a mnemonic because the implementor is thinking that this class of parts could be rendered as a menu item or as an icon in two different presentations. But they could have used any name in place ofMenuItemOrIcon . In one presentation of the interface using Java AWT, the style element may then map this to a java.awt.MenuItem as follows:
 
<style>
  <property class="MenuItemOrIcon" name="rendering"     
            value="MenuItem" />
  ...
</style>
  A UIML document also includes an element, called peers , that enumerates the mapping from property values to specific tags or objects in the target platform:
 
<peers>
  <presentation name="Java-AWT">
    <component name="MenuItem" maps-to="java.awt.MenuItem">
  </presentation>
  ...
<peers>
  To summarize, UIML uses three levels of names for interface parts and events. The first is chosen by the UIML author. The second name is in the style element and maps the mnemonic to an abstract widget name (e.g., MenuItem). The second level allows a mapping from one abstract set of names (e.g., "BigWindow") to multiple platforms (e.g., MFC or Java Swing) without modifying the rest of the interface description. Finally, the third name in thepeers element is part of a toolkit-specific vocabulary and maps the abstract widget name to a name of a widget from the target platform (e.g., java.awt.TextField).
 

UIML Architecture

  Here is a skeleton of a UIML document:
 
<?xml version="1.0"?>
<!DOCTYPE uiml PUBLIC 
  "-//UIT//DTD UIML 2.0 Draft//EN"
  "http://uiml.org/dtds/UIML20.dtd">

<uiml>
   <head> <meta> ... </meta> </head>
   <peers>
      <presentation> <component> ... </component> </presentation>
      <logic>        <component> ... </component> </logic>
   </peers>
   <template>  ... </template>
   <interface> ... </interface>
</uiml>
  Thehead element contains metadata about the current UIML document. Elements in the head element are not considered part of the interface, and have no effect on the rendering or operation of the user interface. The peers element contains the mappings between abstractions in the interface description (i.e., interface parts, properties, events, and methods) and their actual implementations (i.e., toolkit widgets and attributes, platform events, and application logic components). This element specifies the vocabulary for toolkits to which UIML is mapped. Thetemplate element allows reuse of interface elements. When an element appears inside a template it can be included ("sourced") elsewhere in a UIML document. Finally, theinterface element contains the interface description. For complete description of all the UIML elements and syntax, please see UIML 2.0 [9].
  Here is a skeleton of the interface element:
 
<interface>
  <structure> <part>     ... </part>     </structure>
  <style>     <property> ... </property> </style>
  <content>   <constant> ... </constant> </content>
  <behavior>  <rule>     ... </rule>     </behavior>
</interface>
  Thestructure element enumerates a set of interface parts and their organization for various platforms and devices. Thestyle element defines the values of various properties associated with interface parts. The content element associates words, sounds, and images with interface parts to facilitate internationalization or customization for different user groups. Finally, the behavior element enumerates a set of rules that describe how the user interface should react on different stimulus (i.e., from user, device, or the application logic).
  The syntax used to define style in UIML has undergone evolution. The first version of UIML [8] used CSS-like style elements. However, there were certain assumptions in CSS versus UIML that did not fit each other. First, the CSS property catalog is biased toward HTML's printed page model. Second, CSS implements inheritance according to the structure of a document as represented by the HTML tree. In contrast, there are two representations of a user interface in UIML: logical and physical. The logical representation is the tree represented by thestructure element. The physical representation exists when UIML is either interpreted or compiled to a target platform. The target platform may have inheritance rules of its own. For example, font settings may or may not be inherited by components that are added containers in various GUI toolkits. After profiling performance of our own UIML rendering engine for Java, we found that enforcing a CSS inheritance produced a significant run-time expense. Third, CSS specifies the properties of tags in an HTML document. In contrast, UIML is a meta-language, and the tags have no properties. Instead the attributes ofname and classes in UIML are associated with style. Finally, there is the aesthetic consideration that CSS uses a dissimilar syntax to XML. For these reasons, we abandon CSS in the UIML2 specification.
  Another option was to use XSL. XSL's vocabulary for specifying formatting semantics is again biased toward the printed page model of HTML. For example the formatting objects are things like "page-number" and "table-row", and XSL's formatting model is defined in terms of rectangular areas and spaces. This does not fit UIs on all devices (e.g., voice-based UIs). UIML is device-independent and the page model is only one of many possible renderings for a user interface. Thus if we used XSL (or CSS) we would be faced with adding new vocabularies to fit different types of devices. That could be done, but it would not be part of the CSS and XSL specs, unless those specs were modified. Having said all this, it may be useful if one could still choose to use a CSS or XSL style sheet with a UIML document, for example if one is mapping UIML to HTML.
  The remaining section is the behavior element:
 
<behavior>
  <rule>
    <condition>
       <event .../>
    </condition>

    <action>
      <property ...> ... </property>
      <method ...> ... </method>
      <event ...> ... </event>
    </action>
  </rule>
  ...
</behavior>
  The behavior element contains one or more rules. Each rule consists of a condition, triggered either when an event occurs, or when an event occurs and an attribute of the event has a specified value. When triggered, the action associated with the condition is executed. The action could change the property of interface parts, invoke a function in a script, or call a function or method in the application logic.
 

Reusable Interface Components

  UIML enables interface implementors to reuse parts or their entire user interface with the template element. For example, many UIs for electronic commerce applications include a credit-card entry form. If such a form is described in UIML as a template, then it can be reused multiple times either within the same UI or across other UIs. This reduces the amount of UIML code needed to develop a UI and also ensures a consistent presentation across enterprise-wide UIs. Users tend to make fewer mistakes and are more efficient when presented with familiar UIs.
  Here is an example of a template for a simple credit card entry form (see Appendix for full example):
 
<template name="CreditCard">
  <part name="CreditContainer" class="CreditDialog">
    <style>
       <property name="title">Credit Card Entry Form</property>
    </style>
    <part name="CreditNum" class="number"/>
    <part name="AcceptNum" class="Accept">
      <style>
        <proprety name="content">Accept</property>
      </style>
    </part>
  </part>
</template>
  A template element is like a separate branch on the UIML tree (think of a DOM tree [13]). A template branch can be joined with the main UIML tree anywhere there is a similar branch (i.e., the first and only child of template must have the same tag name as the element on the UIML tree where the joined is made). The interface implementor has three choices on how to source the template element with another element, illustrated in Figure 2. The first choice is "replace." All the children of the element on the main tree that sources the template are deleted, and in their place all the child nodes of the template element are added (see Figure 2a). The second choice is "append." All the children of the element on the main tree that sources the template are kept, and all the child nodes of the template element are added then to the list too (see Figure 2b). To avoid name conflicts, the names of the child nodes of the template element are appended with the name given to the template before they are added (e.g., name = "templateName.originalName"). The last choice is "cascade." This is similar to what happens in CSS. The children from the template are added to the element on the main tree but if there is a name conflict (e.g., two elements with the same name), then the child of the element on the main tree is retained (see Figure 2c).
 
  Here is an example of a UIML fragment that uses the above template (assume the template is stored in a file called templates/credit.uiml on an HTTP server):
 
<structure>
  <part ...>
    ...

    <part name="MyCredit" how="replace"
       source="http://server/templates/credit.uiml#CreditCard"/>
  </part>
</structure>

<style>
  <property name="rendering"
     part-class="MyCredit.CreditDialog">Dialog</property>
</style>
  In the above example, if the template was in the same file as the interface description, then source would be set to "#CreditCard". Elements inside a template can source other templates.
  The elements inside the template are accessible from the element that sources them. Thus, you can specify style, content, and behavior information for the template and in effect customized it. In the above example, the rendering property for the dialog in the template was described outside the template.
 

Mapping UIML to the target device

  As mention earlier, UIML does not contain any device-specific information, thus cannot be rendered as is. The peers element provides mappings from interface elements to actual device-specific components that can be rendered (presentation) or executed (logic).
  Here is an example for mapping the above credit card dialog to Java AWT, WML, and VoiceXML:
 
<peers>
  <presentation name="WML">
    <component name="Dialog" maps-to="wml:card"/>
  </presentation>

  <presentation name="VoiceXML">
    <component name="Dialog" maps-to="vxml:form"/>
  </presentation>

  <presentation name="Java-AWT">
    <component name="Dialog" maps-to="java.awt.Dialog"/>
  </presentation>
</peers>
  A nice feature in having the user interface generated from UIML is that you can achieve a similar looking interface across platforms (e.g., enforce the same look-and-feel for an application and override the underlying environment) by suitable setting of style properties and peers. Alternately, you could achieve a totally different looking interface on the different platforms or devices (e.g., a text-based vs. graphical on a PC device).
 

Dynamic Interface Components

  Dynamic Interfaces are interfaces that are generated on-the-fly and are usually custom-made for each user or device. There are two reasons why dynamic interfaces are becoming very popular. First there is a plethora of devices available in the market today and users maybe accessing an application with anyone of them. To make things worst, there is a plethora of technologies available for each device. For example, HTML is enhanced with EcmaScript, Java applets, VRML, and other plug-in technologies. User devices usually support only a small subset of them. Second, commercial applications today offer an enormous amount of functionality but individual users access only a fraction of them. Also, certain functionality may need to be restricted to certain user groups only (e.g., administration tasks), handicapped users may require accessibility features, internationalization requires different vocabularies, etc.
 
UIML elements
 
In UIML there are two ways in which the user interface can be tailored to the device/end user. First, using multiple structure/style/content/behavior sections gives several alternatives to the user. At runtime, the user may specify the names of each section they want to use (e.g., a simple structure with a graphical style and Greek content) and get a custom interface. Second, UIML can be dynamically generated from a database (see Figure 3). An interface server can query the client for a list of device features and/or user preferences and dynamically generate the UIML code for the interface from a database query. The user gets a tailored UI that takes advantage of the technologies supported by the device without overloading the network or the device with unsupported code.
 
Table 1. UIML 2.0 Elements
Tag name DTD Element Attributes
action <!ELEMENT action (method|property|event|edit)*> none
attribute <!ELEMENT attribute (method*)> name, export
behavior <!ELEMENT behavior (rule*)> name, source, how
component <!ELEMENT component (attribute|method)*> name, maps-to, export, source, how
condition <!ELEMENT condition (equal, event)> none
constant <!ELEMENT (#PCDATA|constant)*> name, source, how
content <!ELEMENT content (constant*)> name, source, how
edit Syntax under revision
equal <!ELEMENT equal (event, (constant|property|reference))> none
event <!ELEMENT event EMPTY> part-name, part-class, name, class
head <!ELEMENT head (meta)*> none
interface <!ELEMENT interface (structure|style|content|behavior)*> name, source, how
logic <!ELEMENT logic (component*)> name, source, how
meta <!ELEMENT meta EMPTY> name, content
method <!ELEMENT method ((param*, returns?), script?)> name, class, maps-to, export, type
param <!ELEMENT param EMPTY> name
part <!ELEMENT part (style?, content?, behavior?, part*)> name, class, source, how
peers <!ELEMENT peers (presentation|logic)*> name, source, how
presentation <!ELEMENT presentation (component*)> name, source, how
property <!ELEMENT property (#PCDATA|reference|property|constant)*> name, part-name, part-class, event-name, event-class, method-name, method-class, source, how
reference <!ELEMENT reference EMPTY> constant-name
returns <!ELEMENT returns EMPTY> name
rule <!ELEMENT rule (condition, action)> name, source, how
script <!ELEMENT script (#PCDATA)> type, name, source, how
structure <!ELEMENT structure (part*)> name, source, how
style <!ELEMENT style (property*)> name, source, how
template <!ELEMENT template (peers|interface|structure|style| content|behavior|presentation|logic|part|property| constant|component|script)*> name
uiml <!ELEMENT uiml (head?, peers?, template*, interface?)> none
 

Conclusions

  In this new world of many interface technologies on many types of appliances, it is too time consuming to hand-code a user interface for each appliance. This motivated the development of the User Interface Markup Language (UIML) to describe user interfaces in an appliance-independent manner. UIML is rendered into a usable interface on an appliance either through interpretation or compilation to another markup or programming language. The renderer might be an application installed on the client, a Web browser plug-in, or a compiler on a server.
  UIML permits a very abstract description of a user interface, which is then mapped with style elements to a particular device. A challenge in the design of a general-purpose language like this is to balance the expressive power of the language with simplicity. UIML 2.0 has a limited number of tags and are listed in Table 1.
  One design point that often raises questions in UIML is why the language uses its own style sheets instead of CSS or XSL. The reasons were discussed earlier. But our experience has led us to the following conclusion: It would be better if the W3C's style sheet standards were meta-languages . By this we mean that the CSS and XSL specifications would be more powerful if the vocabulary for formatting objects and style properties wasnot part of the specification. In this way the style sheets could be adapted to any type of device without modifying the core CSS and XSL specifications, to permit use on user interfaces available today or invented in the future.
  The latest version of the UIML 2 specification is available in [9]. To learn more about UIML, or to obtain the source code and executable of a rendering engine that interprets UIML to create Java AWT and Swing interfaces, see the examples and tutorials available at uiml.org.
 

References

 
  •  1. Wireless Markup Language (WML), WapForum, http://www.wapforum.org/
  •  2. T. Kamada, Compact HTML for Small Information Appliances, W3C Note 09-Feb-1998, http://www.w3.org/TR/1998/NOTE-compactHTML-19980209/.
  •  3. HyperText Markup Language 4.0 (HTML), W3C, http://www.w3.org/
  •  4. SpeechML, IBM, http://www.alphaworks.ibm.com/formula/speechml/
  •  5. Voice Markup Language (VoxML), Motorola, http://www.voxml.org/
  •  6. VoiceXML, VoiceXMLForum, http://www.voicexml.org/
  •  7. Marc Abrams, Constantinos Phanouriou, Alan L. Batongbacal, Stephen M. Williams, Jonathan E. Shuster, "UIML: An Appliance-Independent XML User Interface Language," 8th International World Wide Web Conference, Toronto, May 1999, http://www8.org/w8-papers/5b-hypertext-media/uiml/uiml.html. Also appeared in Computer Networks, Vol. 31, 1999, pp. 1695-1708.
  •  8. UIML1.0 specification, http://www.uiml.org/specs/UIML1/, 1997.
  •  9. UIML2.0 specification, http://www.uiml.org/specs/UIML2/, 1999.
  •  10. Extensible Markup Language 1.0 (XML), W3C, http://www.w3.org/
  •  11. Extensible Style Language (XSL), W3C, http://www.w3.org/
  •  12. Cascading Style Sheets (CSS), W3C, http://www.w3.org/
  •  13. Document Object Model (DOM), W3C, http://www.w3.org/
  •  14. XHTML, W3C, http://www.xhtml.org/
 

Appendix. A Complete UIML Example

  Figure 4 shows two possible renderings of the credit card template. On the left is a Java-AWT dialog and on the right is a WML card.
 
  Given below is the complete UIML document used for the example in the body of this paper.
 
<?xml version="1.0"?>
<!DOCTYPE uiml PUBLIC
    "-//UIT//DTD UIML 2.0 Draft//EN"
    "http://uiml.org/dtds/UIML20.dtd">

<uiml>
  <head>
    <meta name="Description"
       content="Use of templates for CreditCard entry form"/>
    <meta name="Author" content="Constantinos Phanouriou"/>
    <meta name="Email" content="uiml-editor@uiml.org"/> 
  </head>
  
  <peers>

    <presentation name="WML">
      <component name="Dialog" maps-to="wml:card"/>
      <component name="TextField" maps-to="wml:input"/>
      <component name="Button" maps-to="wml:DO type='ACCEPT'"/>
      <component name="InputEvent"
         maps-to="wml:event type='onenterforward'"/>
    </presentation>

    <presentation name="VoiceXML">
      <component name="Dialog" maps-to="vxml:form"/>
      <component name="TextField" maps-to="vxml:prompt"/>
      
      <!-- Button does not have a rendering in Voice -->
      <component name="Button" maps-to="E;/>
      <component name="InputEvent" maps-to="vxml:filled"/>
    </presentation>

    <presentation name="Java-AWT">
      <component name="Dialog" maps-to="java.awt.Dialog"/>
      <component name="TextField" maps-to="java.awt.TextField"/>
      <component name="Button" maps-to="java.awt.Button"/>
      <component name="InputEvent"
         maps-to="java.awt.event.ActionEvent"/>
    </presentation>

    <logic name="HTTP">
      <component name="CreditApp">
        <method name="SendCredit" 
          maps-to="http://<server>:port/cgi-bin/acceptCredit.pl?">
          <param name="cnum"/>
        </method>
      </component>
    </logic>

    <logic name="Java">
      <component name="CreditApp" maps-to="myBiz.creditApp.class">
        <method name="SendCredit" maps-to="acceptCredit">
          <param name="cnum"/>
        </method>
      </component>
    </logic>

  </peers>

  <template name="CreditCard">
    <part name="CreditContainer" class="CreditDialog">
      <style>
         <proprety name="title">Credit Card Entry Form</property>
      </style>
      <part name="CreditNum" class="number"/>
      <part name="AcceptNum" class="Accept">
        <style>
          <proprety name="content">Accept</property>
        </style>
      </part>
    </part>
  </template>

  <interface>

    <structure>
      <part name="ECommerceApp">
          <!-- UI description -->
          <part name="MyCredit" source="#CreditCard"/>
      </part>
    </structure>

    <style>
      <property name="rendering" part-class="MyCredit.CreditDialog">
         Dialog</property>
      <property name="rendering" part-class="MyCredit.number">
         TextField</property>
      <property name="rendering" part-class="MyCredit.Accept">
         Button</property>
      <property name="rendering" event-name="InputEvent">
         InputEvent</property>
      <property name="rendering" method-name="SendCredit">
         SendCredit</property>
    </style>

    <behavior>
      <rule>
        <condition>
          <event name="InputEvent" part-name="MyCredit.AcceptNum"/>
        </condition>
        <action>
          <method name="SendCredit">
            <param name="cnum">
              <property name="content" 
                  part-name="MyCredit.CreditNum"/>
            </param>
          </method>
        </action>
      </rule>
    </behavior>

  </interface>
</uiml>

Using XML in a generic model of mediators   Table of contents   Indexes   Evaluating Content Management Systems Based on Information Chunk Size