using domain-specific modeling to generate user interfaces for wizards

20
Using Domain-Specific Modeling to Generate User Interfaces for Wizards Enis Afgan, Jeff Gray, Purushotham Bangalore University of Alabama at Birmingham (UAB) Department of Computer and Information Sciences S oftware Composition and Modeling Laboratory D epartm entofCom puterand Inform ation Sciences U niversity ofA labam a atB irm ingham S o ftC o m This project is supported by an NSF CAREER grant. MDDAUI Workshop MoDELS 2007, Nashville, TN

Upload: zea

Post on 19-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Using Domain-Specific Modeling to Generate User Interfaces for Wizards. MDDAUI Workshop MoDELS 2007, Nashville, TN. Enis Afgan , Jeff Gray , Purushotham Bangalore University of Alabama at Birmingham (UAB) Department of Computer and Information Sciences. This project is supported by - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Using Domain-Specific Modeling to Generate User Interfaces for Wizards

Enis Afgan, Jeff Gray, Purushotham BangaloreUniversity of Alabama at Birmingham (UAB)

Department of Computer and Information Sciences

Software Composition and Modeling Laboratory

Department of Computer and Information SciencesUniversity of Alabama at Birmingham

S o f t C o mThis project is supported by

an NSF CAREER grant.

MDDAUI WorkshopMoDELS 2007, Nashville, TN

Page 2: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Wizards and Abstraction• Many advances in technology emerge from mechanisms

that hide underlying accidental complexities by introducing additional, but simpler layers of abstraction

• Software wizards provide simplified user interaction methods by guiding configuration and customization through a set of targeted questions

• Many activities that previously involved lower level knowledge of the inner workings of a specific application can thus be avoided, inherently improving productivity

Page 3: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Software wizards transiency• A challenge emerges, however, with respect to how the actual wizards are

designed, created, and maintained because:– Wizards are domain and problem specific– New versions and various compositions of wizards need to be created quickly

with a short lifespan

Temporary

Versio

nDomain

Page 4: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Benefits of MDE wizard generationEnd-users can quickly create a pipeline of wizard

pages using high-level modeling abstractions, rather than low-level code artifacts; such models are easier to change than the equivalent code representation

Different model compilers can be associated with the wizard DSML to generate wizards in many different formats (e.g., HTML, Java)

Each wizard can subsequently and transparently store obtained data in different formats (e.g., text, XML, VoiceXML)

Page 5: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Wizard classification

• Based on generation complexity, two types of wizards exist in many applications1. Plain wizards: correspond to simple page

sequencing with appropriate fields incorporated into each page

2. Guided wizards: must incorporate generic code that, based on user input at runtime, can appropriately sequence wizard pages

Page 6: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Generating plain wizards

• Wizard generator must be capable of: a. creating the user interface under given constraintsb. simultaneously and automatically implementing the

method of capturing user data where it is output in the format (e.g., text, XML, VoiceXML) specified by the user

TXTTXT

Data passing Connectivity Page sequencing

Data storage across pages

TXTTXT

Page design

• Metamodel needs to enable and handle:

Page 7: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Generating guided wizards• Guided wizards resemble expert systems• Wizard designer primarily concerned with page

components rather than entire pages– Individual pages must be broken up into components

where, based on input of wizard user at runtime, such components can dynamically be used to compose complete wizard pages at runtime

• Page compositions lead to page scoping within a page as well as across pages– Various wizard paths may take user to a page with

equivalent information – page scoping becomes important because of requirement to reduce size of the model

Page 8: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Handling Control Flow points• When transforming a model into source code, there is a

requirement to manage control flow (CF) elements for individual user choices

• CF logic must be customized to the particular wizard and be transparent to the end-user– CF logic includes connections at the page level and also must

deal with page scoping

TXTTXT TXTTXT TXTTXT TXTTXT

CF

CF

CF

CF

CF

CF

CF

CF

Page 9: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Case Study: ASL for Grid Deployment

• ASL is a new, XML- based, grid language created to provide a method for capturing the core purpose of the application, its requirements, and its options

• It aims at enabling standardized, application-specific information sharing between grid users

1. <asl:ApplicationDescription>2. <asl:ApplicationName>DynamicBLAST</asl:ApplicationName>3. <asl:Description>A wrapper for BLAST application that parallelizes BLAST job

execution 4. by dynamically selecting a number of queries from a pool of user submitted query file 5. and based on available resources it selects the most appropriate version of BLAST 6. algorithm to complete the job as soon as possible.</asl:Description>7. <asl:Version>0.1</asl:Version>8. <asl:Category>Master-Worker</asl:Category>9. <asl:Author>10. <asl:Name>Enis Afgan</asl:Name>11. <asl:Email>[email protected]</asl:Email>12. <asl:Organization>Univeristy of Alabama at Birmmingham</asl:Organization>13. </asl:Author>14. <asl:Owner>15. <asl:Name>Enis Afgan</asl:Name>16. <asl:ContactInfo>[email protected]</asl:ContactInfo>17. <asl:Organization>Univeristy of Alabama at Birmmingham</asl:Organization>18. <asl:SupportInfo>unsupported</asl:SupportInfo>19. </asl:Owner>20. <asl:PublishedUnderLicence>None</asl:PublishedUnderLicence>21. </asl:ApplicationDescription>

Page 10: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Applying MDE to generate ASLGrid expert

Instance model

ASL

Application developer

Application specific wizard XML

document

Page 11: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

WizardGen Metamodel

Page 12: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

A prototype metamodel• As a prototype, we developed a metamodel for

representing wizard components and a model compiler capable of generating the corresponding HTML code; used these for an ASL instance model

• The following elements of a wizard can be described in the metamodel prototype

Connectivity Page sequencing

Page design HTML generation

HTML

Page 13: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Using the metamodel (1)

Page 14: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Using the metamodel (2)

Page 15: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Generated wizard

Page 16: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Metamodel experiences• ASL is a hierarchically structured language, where separate

sections of a document are logically related - the metamodel exploits this structure and uses it as scoping rules for individual pages, thus minimizing number of pages to be generated

• A model compiler accounts for proper page formatting, sequencing, transitioning, and data collection and storage

• The model compiler must be capable of seamlessly producing not only the code for the wizard, but also code that will store the wizard-collected data provided to the wizard at run-time o Implies inclusion of two-level code where model compiler not only

generates wizard code, but also embeds executable code into the wizard itself that, once wizard is executed, is capable of manipulating obtained data in the current environment

• Metamodel details are provided in paper

Page 17: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Model compiler challenges• The development of the model compiler to support all available

features of the corresponding metamodel presented a significant challenge and is currently limited in functionality to support generation of HTML pages realizing the desired page formatting

• The major challenge arose from the need to automatically establish connectivity protocols based on different types of connected objects within a model

• This is because the data storage component is not explicitly defined in the instance model and thus must exist in the compiler alone– Provisioning of such functionality requires broad generality in the

model compiler that must be capable of automatically invoking appropriate code (i.e., as implied by current environment and/or user input)

• Development of such generalized code requires much interdependence between various code modules as well as complex code generation that requires multiple passes over the model

Page 18: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Conclusions

• Domain-Specific Modeling can be an effective tool in improving composition and modification of transient code such as software wizards

• Major challenges dealing with two levels of code generation arose, likely stemming from the model compiler coding practices

Page 19: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

QUESTIONS?

Slides available at: www.cis.uab.edu/afgane

Software Composition and Modeling Laboratory

Department of Computer and Information SciencesUniversity of Alabama at Birmingham

S o f t C o m

Page 20: Using Domain-Specific Modeling to  Generate User Interfaces for Wizards

Future work

• Creation of ‘plain wizard’ version that can easily be modified and subsequently used

• Address challenges with two levels of indirection during code generation– Adoption of Aspect Oriented Programming (AOP)

techniques to leverage required code dependencies and interactions

– A need to modularize code into more manageable components, each capturing the desired functionality