=Paper= {{Paper |id=Vol-297/paper-3 |storemode=property |title=Using Domain-Specific Modeling to Generate User Interfaces for Wizards |pdfUrl=https://ceur-ws.org/Vol-297/paper3.pdf |volume=Vol-297 |dblpUrl=https://dblp.org/rec/conf/models/AfganGB07 }} ==Using Domain-Specific Modeling to Generate User Interfaces for Wizards== https://ceur-ws.org/Vol-297/paper3.pdf
                          Using Domain-Specific Modeling to
                          Generate User Interfaces for Wizards
                                    Enis Afgan, Jeff Gray, Purushotham Bangalore
                                              University of Alabama at Birmingham
                                        Department of Computer and Information Sciences
                                                   1300 University Boulevard
                                                       Campbell Hall #131
                                                      ++ 1 (205) 934-2213
                                               {afgane, gray, puri}@cis.uab.edu



ABSTRACT                                                               configuration. By guiding configuration and customization
The rising adoption and incorporation of computers into everyday       through a set of targeted questions, a wizard can assist in
life requires human-computer interaction methods to be efficient       resolving many activities that previously involved lower level
and easy to understand. Simultaneously, complexities of                knowledge of the inner workings of a specific application. For
underlying computer systems are increasing, inherently requiring       example, software installation and computer diagnostic tools use
deeper understanding and a detailed level of human-computer            wizards to obtain information from a user that is needed to
interaction methods. Software wizards are one important example        perform configuration and analysis tasks. As the trend toward
from the category of tools that simplify this interaction. Through a   raising levels of abstraction continues, wizards offer a viable
simple, domain-specific, and targeted set of guided questions,         alternative to assist end-users in describing more complicated
wizards allow complex tasks to be completed quickly and simply.        tasks that refer to their domain expertise. With supporting tools,
Tasks accomplished by wizards range from simple information            intuitive interfaces and guided suggestions provided by wizards
collection to complex system configuration. Because wizards are        can accomplish many tasks that minimize the required expertise of
task-specific, their lifespan is short and thus must be easily and     specific technical spaces. A challenge emerges, however, with
quickly adapted such that the cost associated with wizard              respect to how the actual wizards are designed and created. This
maintenance is minimized. This paper outlines such wizard              paper describes a domain-specific modeling language (DSML)
requirements and provides a metamodeling approach to wizard            that assists in generating wizards.
generation. A domain-specific modeling language is presented,          Because wizards are domain and problem specific, they are often
which has been shown to be helpful in the generation of domain-        transient and temporary in nature. New versions and various
specific wizards that are capable of adapting to changing              compositions of wizards need to be created, each having a
requirements.                                                          possibly short life span. As such, allocating significant effort to
                                                                       wizard creation is poor use of one’s time and should be
Categories and Subject Descriptors                                     minimized. We realized that a significant improvement in wizard
D.2.13 {Software Engineering}: Reusable Software – Domain              composition could be offered by providing a modeling approach
engineering, reusable libraries, reuse models                          that could be used by a domain expert to design targeted wizards.
                                                                       A domain user can use the generated wizard to create necessary
                                                                       artifacts based on the parameters supported through the wizard
General Terms                                                          questions. By investigating this technique, two categories of users
Design, Reliability, Experimentation, Languages.                       and generators emerged: (1) the domain expert who uses a DSML
                                                                       for specifying a wizard in his/her own domain; this user uses the
Keywords                                                               DSML to concentrate on collecting desired information, (2) the
Metamodeling, wizards, automated wizard generation, user               domain user who uses the wizard that was designed by the expert;
interfaces                                                             this user provides specific and targeted information.
                                                                       The idea of wizard composition and guided information collection
1. INTRODUCTION                                                        contributes to the trend of improved abstraction mechanisms for
Many advances in technology emerge from mechanisms that hide           specifying application information. By applying model-driven
underlying accidental complexities by introducing additional           engineering (MDE) [2] to wizard composition and generation,
layers of abstraction. The renewed interest in domain-specific         improvements to wizard development are introduced by
languages is an example of how higher levels of abstraction can        eliminating complexity of hand-coding all the complex links
assist end-users in describing concerns from the problem space of      between pages. Furthermore, different model compilers can be
a particular domain, as opposed to adopting notations of a specific    associated with the wizard DSML to generate wizards in many
solution space (e.g., use of a general-purpose programming             different formats (e.g., HTML, Java), each of which can store the
language or middleware). Software wizards [1] are an additional        obtained data in different formats (e.g., text, XML, VoiceXML).
technique that assist in simplifying computer usage and
We have devised and developed a DSML that enables generation         of execution built into this type of wizard at the time of model
of user interfaces associated with wizards. A domain selected as     creation. After the model is created, the generator is in charge of
an example and used throughout this paper comes from the area of     converting the model into underlying code (e.g., Java, HTML).
grid computing [3]. The Application Specification Language           Even though this type of wizard may seem somewhat trivial, the
(ASL) [4] is an XML-based language allowing an application           task that must be handled by the wizard generator at this stage is
developer to describe functionality, installation, and invocation    two-fold: a) create the user interface under given constraints; and
properties of their application that persist throughout the grid     b) simultaneously and automatically implement the method of
environment. We selected ASL as an example because                   capturing user data where it is output in the format (e.g., text,
composition of an ASL specification can be a time-consuming          XML, VoiceXML) specified by the user. Depending on the
and error-prone task for the application developer (i.e., wizard     underlying technology used, the correct method of data passing
user). The use of a wizard to create an ASL document consists of     must be applied (e.g., if a wizard is created in HTML use CGI or
constructing representations of the necessary language elements      servlets). This step of wizard generation must be implemented in
describing an application. An application developer may answer       the generator at a very generic level because the end-user denotes
the wizard’s questions with parameters that describe the             their intention by connecting two individual pages, but does not
corresponding application feature. We have found that a wizard       provide any additional parameters. The result of the modeling task
helps to remove many of the errors in formatting an ASL              is the specification of a software configuration wizard where the
document to ensure that the document was created correctly (i.e.,    user specifies the necessary information to link appropriate
the application developer would be alleviated of a lot of typing     libraries and the location of needed services.
and checking the correctness of XML tags).                           Guided wizards extend the concept of page sequencing and are
The roles of each user and the tools that they use are highlighted   more closely related to expert systems [5]. Rather than having a
in Figure 1. The DSML generates the corresponding wizard             predefined path set at the time of creation, guided wizards must
(including page formatting and composition), which is then used      have generic code incorporated into them so that user choices
by the application developer to provide descriptive information      determine the next page of the wizard to be displayed.
about the application through a targeted set of questions. After     Incorporating these ideas into a metamodel requires much more
completing the wizard, an XML document is created                    care to be taken and imposes much higher requirements on the
corresponding to the data that was collected (i.e., correctly        code generators. There are two major considerations at the
formatted, ASL schema conforming document).                          metamodel level when dealing with a guided wizard. The first
                               Application                           consideration is the requirement to create connections not only
    Grid expert                developer                             between entire pages of the wizard, but also to offer the user a set
                                                                     of predefined options. A user of the wizard modeling language
                                                                     must be able to make connections between those individual
                                                                     options and between subsequent wizard pages. The second
                                                                     consideration deals with page scoping. Because different paths in
                                                                     the course of wizard execution may take the wizard user to a page
                                                                     with equivalent information, there may be redundant pages
                                                                     floating around the instance model resulting in repetitive work
                                                    ASL              done by the designer, eventually leading to more difficult page
                           Application specific
                                                                     management and updating. Depending on the metamodel and
 Instance model                  wizard             XML              corresponding data, this condition may be unavoidable, but by
                                                  document           proper scoping and introduction of the hierarchical structuring of
                                                                     the collected output such issues can be reduced.
                                                                     When using a generator for a wizard model and transforming it
                                                                     into the wizard implementation (e.g., HTML or source code),
                                                                     there is the additional requirement to manage control flow
 Figure 1. Two levels of abstraction accomplished by using a         elements for individual user choices. This logic must be
          DSML to generate a higher level wizard.                    customized to the particular wizard and be completely transparent
                                                                     to the end-user. Beyond making the necessary connections at the
2. WIZARD CLASSIFICATION                                             page level, the generator must be capable of composing necessary
Using MDE to compose wizards requires the design of a                code, including page scoping which introduces new challenges for
metamodel capable of representing necessary entities within the      the generator developer. Figure 2 provides a graphical
wizard domain. Thus, determining the purpose of a metamodel          representation of these considerations, where the workflow of a
depends on the type of wizards that will ultimately be created. In   guided wizard can be seen. The user initially provides some data,
order to distinguish general types of metamodels to be created, we   which leads to a subsequent page that may branch off into several
separate wizards into two broad categories: plain and guided.        possible pages. Selection of the subsequent page is determined on
                                                                     user input at run-time. Each page may branch into multiple
Plain wizards correspond to simple page sequencing with              subsequent pages, some of which can be equivalent in context,
appropriate fields incorporated into each page. The categorizing     even though the paths may differ. At each step of the wizard,
components of this type of metamodel are needed to enable and        control flow (CF) code logic must be provided by the wizard
handle connectivity between different pages, sequencing of the       generator along with the code for data storage that incrementally
pages, data passing and storage across the pages, as well as page    constructs the resulting document (e.g., Data).
design (including proper page formatting). There is a single path
                                                                      a single page or establish connections between pages), and the
                                                                      remaining elements (numbers 7-15) correspond to wizard page
                           C                    C
                                                                      components. All of the elements except number 8 directly
                                                                      correspond to page components such as text box or a drop down
                                                                      menu. In the case of composite elements (e.g., drop down menu,
                           C                C                         radio button group), lower level elements are provided to allow
            C                                                         user creation of individual user options. Number 8 is a ‘help
                                                                      element’ allowing each element to be associated with context-
                           C                                          sensitive help (as supplied by the metamodel user).
                                                    C




  Data              Data             Data               Data



   Figure 2. Wizard flow showing multiplicity of generated
 wizard pages and requirement to handle control flow (CF) at
    each junction as the Data document is being generated.

3. A PROTOTYPE METAMODEL
To investigate the benefits of model-driven generation of wizards,
we developed a metamodel capable of representing wizard
components found in ASL. A model compiler was also developed
to generate the corresponding HTML code to represent the
wizard. As a supporting tool, we used the Generic Modeling
Environment (GME) [6], which is a metamodeling tool that can
be used to build DSMLs. Our metamodel describes a modeling
language that allows grid experts to specify the following
elements of a wizard: compose pages with corresponding elements
found in ASL, connect those pages into a meaningful flow, and
generate matching HTML code that can be incorporated into a
grid web portal interface.
The modeling language mirrors the structure of ASL. Because
ASL is a hierarchically structured language, which is                      Figure 3. Sample page of generated wizard to collect
compartmentalized so that separate sections of a document are                  application information as defined in ASL.
logically related, the metamodel conforms to the desired scoping
                                                                      A model compiler was developed for this metamodel to generate
rules of individual pages. By providing hierarchical components
                                                                      the wizard in HTML and accommodate for proper page
within the metamodel based on segregation of individual sections
                                                                      formatting, sequencing and transitioning. The development of the
of ASL, the metamodel supports logical and meaningful structure
                                                                      model compiler to support all available features of the
of wizard generation to the grid expert. These sectionally-
                                                                      corresponding metamodel presented a significant challenge. The
structured components provide page scoping, which allow the
                                                                      current implementation of the model compiler is limited in
user to logically separate individual pages into subsections. This
                                                                      functionality to support generation of HTML pages realizing the
assists in keeping the number of pages to a manageable level.
                                                                      desired page formatting. Page arrangement and page connectivity
Because pages at separate sections of a wizard are generally
                                                                      is still unavailable. The major challenge arose from the need to
dissimilar, metamodel segregation also minimizes the requirement
                                                                      automatically establish connectivity protocols based on different
for redundant page composition. At the current stage of
                                                                      types of connected objects within a model. A sample page of the
development, the metamodel is capable of representing individual
                                                                      generated wizard in HTML is provided in Figure 3. This figure
page components, compose those into a meaningful format and
                                                                      shows the initial page of the wizard, corresponding to the general
make them part of a larger section. Additionally, connections
                                                                      information collection page of ASL. The figure also shows the
between entire pages corresponding to ASL sections can be
                                                                      metamodel supplied outline of the interactive help functionality.
established.
Figure 4 shows the metamodel with numbered elements, which            4. CONCLUSIONS AND FUTURE WORK
are referenced in the rest of this section. In the metamodel, there
                                                                      This paper is a report of work in progress that started with a
are three major sections: section model, connection elements and
                                                                      specific goal of producing wizards to assist in grid document and
individual page components. The section model (number 6) is the
                                                                      application configuration. During the course of our investigation,
starting element of the entire metamodel setting the connectivity
                                                                      we realized that our modeling language was broader in scope and
rules and encompassing all the other components available in the
                                                                      applicable to multiple domains. This paper provides a motivation
metamodel. The connectivity elements (numbers 1-5) establish
                                                                      of the requirements and challenges for specifying the composition
different types of connections (i.e., whether components belong to
        1                                   6                                                7                             16

            2

                                                                        10                       11            12               13

            3            4                      9


                             5
                                                     8

                                                                                                                                14
                                                                                                      15

                 Figure 4. Metamodel for wizard generation. This particular instance is for creating ASL documents.
of generic wizards through the use of DSMLs. A contribution of               reuse it transparently. A need to modularize code into more
this work is the two levels of indirection that have to be handled           manageable components, each capturing the desired functionality,
through the metamodeling environment. This means that the                    became apparent. Thus, we are considering the use of techniques
compiler must seamlessly produce not only the code for the                   such as the Aspect-Oriented Programming [7] to solve such
wizard composition, but it also must incorporate code into the               issues. Eventually, with the improvements in generation of our
wizard that will store the data provided to the wizard at run-time           metamodel compiler, new fields for tool applicability can be
in the appropriate format. The data storage component is not                 realized, such as automated job submission interface generation
explicitly defined in the instance model and thus must exist in the          for grid applications, as well as simultaneous output of multiple
generator. Provisioning of such functionality requires broad                 formats of wizard-collected data requiring minimal user
generality in the generator that must be capable of automatically            intervention.
invoking (i.e., as implied by current environment and/or user
input) appropriate code. Development of such generalized code
                                                                             5. REFERENCES
requires much interdependence between various code modules as
                                                                             [1] D. Batory, G. Chen, E. Robertson, and T. Wang, "Web-
well as complex code generation two levels deep (i.e., code
                                                                                 Advertised Generators and Design Wizards," International
generated by the model compiler is the wizard code). This
                                                                                 Conference on Software Reuse (ICSR), Victoria, Canada,
generated code must subsequently be capable of responding to
                                                                                 1998.
wizard requirements and guide the wizard actions as well as
                                                                             [2] D. Schmidt, "Model-Driven Engineering," IEEE Computer,
generate the final output.
                                                                                 vol. 39, pp. 25-32, 2006.
A DSML was designed to support the approach. In the                          [3] The Grid: Blueprint for a New Computing Infrastructure,
development process, issues arose with the implementation of the                 Morgan Kaufmann Publishers, 1998.
compiler code dealing with the support for the two levels of                 [4] E. Afgan and P. Bangalore, "Application Specification
indirection. Because both of the mentioned levels must                           Language (ASL) – A Language for Describing Applications
simultaneously be supported in the compiler code accommodating                   in Grid Computing," 4th International Conference on Grid
for any possible combination of elements found in the metamodel,                 Services Engineering and Management (GSEM), Leipzig,
the compiler encountered several challenges. This was due to the                 Germany, 2007.
fact that at each step of the wizard and at each level of indirection        [5] J. Durkin, Expert Systems: Design and Development,
very specific code needed to be created automatically. Portions of               Macmillan, 1998.
generator code were often found to be equivalent and dependent               [6] K. Balasubramanian, A. Gokhale, G. Karsai, J. Sztipanovits,
on dispersed snippets of code inviting generator code components                 and S. Neema, "Developing Applications using Model-
to be indirectly connected. Use of standard object-oriented                      Driven Design Environments," IEEE Computer, vol. 39,
programming techniques resulted in inconsistent functionality that               pp. 33-40, 2006.
was hard to manage and maintain. More specifically, this was                 [7] G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes,
referring to compiler code that was used to generated page                       J.-M. Loingtier, and J. Irwin, "Aspect-Oriented
connections and organize page layout. Because each component                     Programming," European Conference on Object-Oriented
was slightly different depending on the context, compiler code                   Programming (ECOOP), Jyväskylä, Finland, 1997.
needed to be adjusted accordingly rather than simply being able to