<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Using HCI-Patterns with Model-based Generation of Advanced User-Interfaces</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Robert Rathsack, Andreas Wolff</string-name>
          <email>Andreas.Wolff@informatik.uni-rostock.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter Forbrig</string-name>
          <email>pforbrig@informatik.uni-rostock.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Rostock, Institute of Computer Science</institution>
          ,
          <addr-line>Albert Einstein Str. 21, 18059 Rostock</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In the HCI community a number of pattern catalogues were created during the last years. Due to the nature of such patterns they are often described high-level and abstract. In this paper we present an approach to translate at least a certain kind of patterns into a machine readable form, while keeping them abstract in terms of problem independence. Those translated HCI patterns can be used for a semiautomated MDA-procedure using device- and mapping definitions. Also an example for this development cycle, a sequence of pattern-based transformations, is presented.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        We currently investigate two separate methods of where to
specify the resulting “pattern instance components (PICs)”.
The approach presented in this paper is to place a PIC
within a catalogue itself. This is possible by enhancing the
underlying pattern-language and by making use of
additional mapping files. The other approach is to include
some sort of programming logic within the pattern
catalogue itself which would reduce or even avoid the
necessity of separate mapping definitions for PICs. Details
about this procedure can be found in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>Within the first part of this paper we present the extensions
to a pattern-language that we found necessary to define
PICs and explain how mapping files can be used to generate
CUIs from abstract user interfaces that were furnished with
HCI-pattern information.</p>
    </sec>
    <sec id="sec-2">
      <title>REALISATION OF PATTERN AS COMPONENTS</title>
      <p>A pattern is an abstract description of a best-practice for a
certain problem. HCI patterns in catalogues are described in
a textual manner, often with a graphical example and
sometimes sample source code or other implementation
hints. Such a description is insufficient for MDA purposes,
because it cannot be used for automated model
transformations.</p>
      <p>A pattern description usable for such transformations has to
be detailed down to the abstraction of a single user interface
object. Our approach is to construct PICs top-down by
segmenting a pattern into smaller PICs. The bottom-level is
constituted by PICs which can directly be mapped to
abstract user interface objects. To refine a pattern and thus
define its PIC a basic set of operators and quantifiers was
identified.</p>
      <p>XOR operator “!” is used to mark a choice between two
components available as sub-PICs.</p>
      <p>Display_Both operator “||” marks two sub-PICs as to be
displayed simultaneously.</p>
      <p>Display_Sequence operator “|-“ defines two sub-PICs as
to be displayed after each other. Evaluation is from left to
right.</p>
      <sec id="sec-2-1">
        <title>Operator ! ||, |( )</title>
      </sec>
      <sec id="sec-2-2">
        <title>Name</title>
        <p>XOR</p>
      </sec>
      <sec id="sec-2-3">
        <title>SIMUL, SEQU</title>
      </sec>
      <sec id="sec-2-4">
        <title>GROUP</title>
      </sec>
      <sec id="sec-2-5">
        <title>Priority 1 2 3</title>
        <p>Table 1 – Operator precedence
Parenthesis may be used for grouping, squared brackets to
parameterise a sub-component or to pass options for the
mapping stage. The operator precedence is shown in table
1.</p>
        <p>Furthermore quantifiers were found useful to define a
repeated or optional sub-component. Table 2 depicts all
available quantifiers.</p>
      </sec>
      <sec id="sec-2-6">
        <title>Quantifier</title>
        <p>N/A
?
*
+</p>
      </sec>
      <sec id="sec-2-7">
        <title>Meaning 1 0 or 1</title>
      </sec>
      <sec id="sec-2-8">
        <title>Any, incl. 0</title>
      </sec>
      <sec id="sec-2-9">
        <title>Any, at least 1</title>
        <p>To illustrate the usage of sub-PICs, quantifiers and
operators in the following an exemplary component
definition is given. A pattern “Master_Detail” as
generalisation of “Two-Panel Selector” and “Cascading
Lists” from Tidwell will be defined. Master_Detail is
applicable (1) if a user has to navigate hierarchical data or
(2) if displaying detail information of a set of objects in one
place is not desired or even possible, e.g. by display size
restrictions. The Master-Detail pattern specifies a solution
consisting of to steps: first select the object whose details
are of interest and as second step display that information
separately.</p>
      </sec>
      <sec id="sec-2-10">
        <title>Attribute</title>
        <p>context
child_rule
applicable
layout</p>
      </sec>
      <sec id="sec-2-11">
        <title>Meaning</title>
      </sec>
      <sec id="sec-2-12">
        <title>Name of pattern or refinement</title>
        <p>
          Available refinements and their relation
defined with operators and quantifiers
Optional, restrict application of pattern or
component to mentioned elements; Notation
follows the one proposed in [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]
Defines arrangement of sub-components in
cases where child_rule defines refinements
as to be displayed simultaneously
Master_Detail’s PIC is defined in an XML dialect related to
PLML [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], added attributes are explained in table 3.
Context, problem, solution and rational are omitted here to
save space, but actually do contain a textual description.
The defined component can be displayed using either PIC
“composite” or “lookup”, whereas “composite” is selected
to be “Master_Detail’s” default representation. Related
patterns deal with comparable problems, in this case
“print_object” and sub-component “browse” of pattern
“find” are declared to do so.
&lt;pattern
context="master_detail/composite"
child_rule=
"/find/browse||(/master_detail!/print_object)"
layout="horizontal/ungrouped"
applicable_on="uio" /&gt;
&lt;pattern
context="master_detail/lookup"
child_rule=
"/find/browse|-(/master_detail!/print_object)" /&gt;
        </p>
        <p>Listing 2 – Master_Detail’s sub-components
Listing 2 shows the definition of Master_Detail’s possible
sub-components. The major difference between them is the
display sequence of alternatives. PIC “composite” shows
navigation and details simultaneously on screen, while
“lookup” clears the screen after selecting the target object.
Note that it is possible to declare any (sub-) component type
as child; this includes parent types and the current
component itself. Sections from the definition of PICs
“print_object” and “find” are displayed in listing 3, they
require another PIC “text” of which also only a small
fraction is shown.
&lt;pattern
context="find/browse"
child_rule="structured[default]!linear" /&gt;
&lt;pattern
context="find/browse/structured"
applicable_on="input_tree" /&gt;
&lt;pattern
context="find/browse/linear"
applicable_on="input_1-n,input_m-n" /&gt;
…
&lt;pattern
context="print_object"
child_rule="text!image"/&gt;
&lt;pattern
context="print_object/text"
child_rule="/text/multiline" /&gt;
&lt;pattern</p>
        <p>context="print_object/image" /&gt;
&lt;pattern
context="text/multiline"
applicable_on="input_string,output_string" /&gt;
Listing 3 – PIC definitions of “text”, “print_object” and “find”
At this point “Master_Detail’s” decomposition is complete,
since all referenced components can be applied to abstract
user interface elements.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>USING PATTERN INSTANCE COMPONENTS FOR AUI</title>
      <p>
        A brief description of how we integrate PICs in our
modelbased interface development process follows. The idea is to
add component references by inserting them within a new
XML namespace into a XML based abstract user interface
(AUI) description language. These references are used in
combination with device-dependent mappings while
generating an application’s CUI (concrete user interface).
We consider model-based software development as a
sequence of transformations between models. Basis for any
development is a task model. It results from requirements
engineering and is defined by means of CTTE [10]. To
derive an AUI a dialogue model of an application is
developed, whereto tasks are assigned to views and
transitions between such views and tasks are defined.
The combination of task and dialogue model forms an
initial AUI which we currently represent in XUL [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. To
retain task references during further transformations an
AUI’s XUL contains XML attributes for task control data.
For details see e.g. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
PIC references are added to the AUI definition in a similar
way. An own XML namespace was created for this
purpose, such it is easily possible to exchange XUL by
XIML or another XML based interface language if desired
in future times. Table 4 depicts a subset of content and
meaning of PIC-namespaces elements.
      </p>
      <sec id="sec-3-1">
        <title>Attribute</title>
        <p>pattern</p>
      </sec>
      <sec id="sec-3-2">
        <title>Meaning</title>
        <p>PIC to use
display_sequences Interface elements which are opened
after each other, referenced by an id;
correlates with “child_rule” of table 3
display_order
layout</p>
      </sec>
      <sec id="sec-3-3">
        <title>Defines sequence of child elements within a grouping container. Primarily useful as hint to a CUI generator.</title>
      </sec>
      <sec id="sec-3-4">
        <title>Layout hint for simultaneously displayed elements; may be used to override “layout” of a PIC definition</title>
        <p>To demonstrate the application of a PIC to an AUI, listing 4
shows a section of a pattern enhanced AUI definition. Task
control data is omitted due to space limitations. The
PICnamespace is “hcipattern”.
&lt;vbox id="vbox_0"
hcipattern:pattern="multivalue_input_form"
hcipattern:layout="vertical/ungrouped"&gt;
&lt;groupbox id="groupbox_1"
name="Create new account"
hcipattern:layout="vertical/grouped"&gt;
&lt;box id="grid_2" hcipattern:pattern=
"multivalue_input_form/input"
hcipattern:layout="table[numColumns:2]"&gt;
&lt;label id="label_3" name="Name:"
hcipattern:pattern="text/label"&gt;
Listing 4 – PIC enhanced AUI definition</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>GENERATING THE CUI</title>
      <p>In order to make use of instance components and their
refinements in an automated way and therefore supply
suitable tool support, the definition of mapping rules is
necessary.</p>
      <p>Mapping rules serve as and are based on device models and
as such enable us to adapt a abstract user interface for
different devices and contexts-of-use.</p>
      <p>To map AUI elements to specific elements of a CUI
attributes pattern and layout, of table 4, are most relevant.
A mapping definition for a certain device is
straightforward. In a simple XML based UI language it
consists merely of value pairs (context, target). Context
denotes the (sub-)PIC and target is the destination element
in the CUI. To suit for more complex UI definitions
parameters can be defined and consequently passed to the
CUI generator as (name,value) pairs.</p>
      <p>Should a PIC definition contain choices (XOR operator) the
mapping rules also include the decision which option is to
be applied for the CUI.</p>
      <p>If a destination language already supports a layout type by
itself layout-mappings should be defined. Abstract layout
“vertical/grouped” in XUL as CUI for example can be
mapped to a specific element “groupbox”, parameterised
with orientation “vertical”. While an abstract layout
“horizontal/ungrouped” would be mapped to an XUL
“hbox” element.</p>
      <p>Listing 5 presents a section of mapping rules relevant for
“master_detail”; result would be a XUL CUI suitable for a
personal computer. A rule set for XUL on PDA is slightly
different.
&lt;pattern_profile name="XUL/PC excerpt"</p>
      <p>device="xulpc"&gt;
&lt;pattern_mappings&gt;
&lt;mapping context="master_detail/composite"
layout="horizontal/ungrouped" /&gt;
&lt;mapping context="print_object/text"</p>
      <p>target="textbox"&gt;
&lt;feature name="multiline" value="true" /&gt;
&lt;/mapping&gt;
&lt;mapping context="print_object/image"</p>
      <p>target="image" /&gt;
&lt;mapping context="find/browse/structured"
target="tree" /&gt;
&lt;/pattern_mappings&gt;
&lt;pattern_layouts&gt;
&lt;layout context="vertical/grouped"</p>
      <p>target="groupbox"&gt;
&lt;feature name="orientation" value="vertical" /&gt;
&lt;/layout&gt;
&lt;layout context="horizontal/ungrouped"</p>
      <p>target="hbox" /&gt;
&lt;/pattern_layouts&gt;
&lt;/pattern_profile&gt;</p>
      <p>Listing 5 – Mapping rules definition
To actually generate an application’s user interface a
generator tool is needed. It combines a pattern enhanced
AUI description via above mentioned mapping rules to a
CUI for a specific device. Generators need to be written for
each destination language; currently we are able to generate
XUL and partly Java UI’s.</p>
      <p>As an example and to demonstrate the results we get from
our tools a mail client was modelled and its user interfaces
generated for a PC and a PDA. The master_detail pattern
was used twice here. Its first application is to select account
and folder. The second use is the decision which message
from within that folder shall be displayed.</p>
      <p>Mapping rules for XUL on PC state that all components can
be displayed at once, figure 1 depicts the result: a typical
mail application view.
Mapping rules and sub-PIC choices for the same AUI on a
PDA are declared in a manner to reduce screen space. Each
task has its own single view. A user would select folder and
account on the first screen (top-left) select the message in
screen #2 (top-right) and would get the message’s text on a
third screen (bottom). Note that the content of the tree,
messages selector and message text were added manually
for demonstration purposes, as they would be normally
provided by an application at run-time.</p>
    </sec>
    <sec id="sec-5">
      <title>CONCLUSION</title>
      <p>As an effort to make use of the knowledge in HCI pattern
catalogues in a model-based UI generation process, an
approach was presented of how to integrate such patterns as
components into an existing MDA approach.</p>
      <p>We proposed to combine pattern catalogues and mapping
rules to support varying devices and contexts-of-use, based
on the same AUI.</p>
      <p>For these purposes enhancements to an existing
patternlanguage were proposed. An initial toolset supporting a
developer in such a process was developed and used to
create an exemplary user interface for a mail client.</p>
    </sec>
    <sec id="sec-6">
      <title>FUTURE WORK</title>
      <p>
        Our toolset has to be enhanced to generate interfaces in
other languages. An advanced Java support seems to be a
minimum; it is required to have a better comparison of the
potential of our approach in real applications. Secondly, an
extensive comparison of our both approaches on pattern
instance components is required. Eventually a decision is to
be made whether to merge them or drop one. Most
important seems the extensions of our pattern catalogue.
Currently we only translated five, rather small, patterns. An
elaborated investigation similar to [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] should be done.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Wolff</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Forbrig</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Dittmar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Reichart</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Linking GUI Elements to Tasks - Supporting an Evolutionary Design Process</article-title>
          ,
          <source>Proc. of. Tamodia</source>
          <year>2005</year>
          , Gdansk, Poland, p.
          <fpage>27</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Rathsack</surname>
          </string-name>
          , R.:
          <article-title>Generierung von Gerätespezifikationen aus abstrakten Spezifikationen unter Beachtung von HCI Pattern</article-title>
          ,
          <source>Master Thesis</source>
          , University of Rostock,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>3. PLML: http://www.cs.kent.ac.uk/people/staff/saf /patterns/plml.html</mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Tidwell</surname>
          </string-name>
          , Jennifer: Pattern catalogue: http://www.mit.edu/~jtidwell/ interaction_patterns.html
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>5. Van Welie pattern catalogue: http://www.welie.com/ patterns/index.html</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Arnout</surname>
          </string-name>
          , Karine: From Pattern to Components,
          <source>PhD dissertation</source>
          , Swiss Institute of Technology,
          <source>Zurich 2004</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Wolff</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Forbrig</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Dittmar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Reichart</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Tool Support for an Evolutionary Design Process using Patterns</article-title>
          ,
          <source>Proc. of Workshop on Multi-channel Adaptive Context-sensitive Systems</source>
          <year>2006</year>
          , Glasgow, GB, p.
          <fpage>71</fpage>
          -
          <lpage>80</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Müller</surname>
          </string-name>
          , Andreas: Spezifikation geräteunabhängiger Benutzerschnittstellen durch Markup-Konzepte,
          <source>PhD dissertation</source>
          , University of Rostock,
          <year>2003</year>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>9. XUL XML User Interface http</article-title>
          ://www.mozilla.org/projects/xul 10.CTTE: The ConcurTaskTrees http://giove.cnuce.cnr.it/ctte.html
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>