Master Thesis
Total Page:16
File Type:pdf, Size:1020Kb
Specification and Generation of User Interfaces Based on Method-Oriented Dialog Flows by Artun Subasi in Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science at the University of Kaiserslautern Faculty of Computer Science May 10, 2011 Thesis Supervisors: Prof. Dr. Arnd Poetzsch-Heffter Dr. Gerhard Pews Dipl.-Inf. Patrick Michel Abstract Considerable time and effort is spent on implementing user interfaces and assuring that the implementation conforms to the user interface architecture. Although existing user interface generation approaches can be used to reduce the implementation effort, the generated user interfaces are not tailored to user interface architectures. This thesis shows how dialog flow specifications can be used for the automatic generation of user interfaces with regard to user interface architectures. An abstract user interface specifi- cation approach is proposed which enables platform independent specification of dialog flows. In addition, a Java-based user interface specification language is used to inves- tigate whether dialog flows can be practically defined using the elements of the Java language, such as interfaces and annotations. As a proof of concept, a new software tool is presented which is able to generate web based graphical user interfaces with regard to a concrete user interface architecture which was developed by the \Bundesstelle f¨urInformationstechnik des Bundesverwaltungsamtes" in cooperation with Capgemini sd&m. The evaluation results show that the developed user interface specification and generation method optimizes the workflow for the creation of the user interfaces. i Declaration I declare that this thesis was composed by myself, that the work contained herein is my own except where explicitly stated otherwise in the text, and that this work has not been submitted for any other degree or professional qualification except as specified. Kaiserslautern, May 10, 2011 Artun Subasi ii Acknowledgements I would like to express my appreciation to Prof. Dr. Arnd Poetzsch-Heffter and Dr. Gerhard Pews for their efforts in the organization of this thesis, and for the insightful conversations to set the scope of the work. My utmost gratitude goes to Patrick Michel for his very helpful comments on the text, for his great advices on the structuring of the work, and for his fast responses to my e-mails, even on weekends. I would like to thank Andy Scherzinger and Simon Spielmann for their continuous feedback during the development of the ideas in this thesis. I would also like to thank Marco Rose for his effort on the evaluation of the generator component which was developed in this thesis. I would like to express further thanks to Florian Strauß for his help on the installation of the needed software environment. I thank Capgemini sd&m for providing me the opportunity to participate in the company's training program, and for the compensation of my travel costs. I thank the \Arbeitsgruppe Softwaretechnik" for providing me a state of the art laptop for the thesis. Additional thanks go to Hans Schmitt and the Service Center Informatik for providing the software used in the thesis. I thank the German Research Center of Artificial Intelligence (DFKI) for allowing me to use the company's HiWi room during the thesis, and for the delicious coffee. The most special thanks go to my family and friends for their support throughout the thesis. iii Contents 1 Introduction 1 1.1 Terminology......................................3 2 Related Work5 2.1 Presentation Models.................................6 2.1.1 Languages for Specifying Presentation Models...............7 2.1.2 Presentation Models for Web Applications.................8 2.2 Dialog Models..................................... 10 2.2.1 Dialog Frameworks.............................. 11 2.2.2 Related Frameworks............................. 12 2.3 Domain Models and Domain-Driven Design.................... 16 2.3.1 Naked Objects................................ 16 2.3.2 Related Frameworks............................. 18 2.4 Task Models and Others............................... 20 3 Method-Oriented Dialog Flows 21 3.1 The Characteristics of MODF............................ 22 3.1.1 Generation of User Interfaces........................ 22 3.1.2 Method-Orientation............................. 24 3.1.3 Data Flow................................... 26 3.1.4 Reusability of Flows............................. 27 3.2 The Flexibility of MODF.............................. 32 3.2.1 User Interfaces................................ 32 3.2.2 Application Requirements.......................... 32 3.2.3 Specification Languages........................... 34 3.3 The MODF Meta Model............................... 36 3.3.1 UML Specification of the MODF Meta Model............... 38 3.3.2 An Example Scenario............................ 42 4 MODF Specifications using Java Annotations 45 4.1 Example MODF Specification............................ 46 4.2 Definition of the Java Annotations......................... 52 4.3 Steps to Define Dialog Flows............................ 56 4.4 Transformation to MODF Models.......................... 57 5 The Register Factory Web GUI Generator 59 5.1 Introduction to the Register Factory........................ 59 5.2 The GUI Layer of the Register Factory Applications............... 61 5.2.1 Used Frameworks............................... 62 iv Contents 5.2.2 The GUI Components............................ 62 5.2.3 Interactions Between the GUI Components................ 64 5.3 Generation of the GUI Components........................ 65 5.3.1 Generation of the Backing Bean Field Names............... 66 5.3.2 Generation of the Backing Bean Data Types............... 68 5.3.3 Mapping of Collections........................... 70 5.3.4 Binding to the Application Logic Layer.................. 71 5.4 Implementation of the Register Factory Web GUI Generator.......... 72 6 Evaluation 76 7 Conclusion 81 7.1 Future Work..................................... 82 Bibliography 86 v List of Figures 2.1 The mapping problem in the interface models...................6 2.2 Coarse architecture of an application with a dialog controller.......... 11 2.3 An example of a dialogue net............................. 13 2.4 The layers of Naked Objects............................. 17 2.5 An example GUI for Naked Objects........................ 17 3.1 Generation of UI layers based on MODF...................... 24 3.2 Method orientation.................................. 25 3.3 Data flows between dialogs............................. 26 3.4 Hierarchical decomposition of flows......................... 28 3.5 Removing redundancies from flows......................... 29 3.6 Limits of decomposition............................... 30 3.7 Directed acyclic graph of a flow with hierarchical decomposition......... 30 3.8 The three axes of MODF.............................. 33 3.9 The relations between the MODF meta model, models and specifications.... 37 3.10 UML Class Diagram of the MODF Meta Model.................. 38 3.11 The scenario for demonstrating the MODF model................. 43 3.12 An example of a MODF Model........................... 44 4.1 Overview of flow interfaces............................. 46 4.2 Overview of the scenario............................... 50 5.1 Overview of the application landscape....................... 60 5.2 The technical architecture of the Register Factory applications......... 61 5.3 The GUI components of the Register Factory applications and their relations. 63 5.4 Overview of the relations between the generated artifacts............ 67 5.5 The visualization of MODF models in Eclipse................... 73 6.1 Overview of the classes used by the example scenario............... 76 6.2 Demonstration of a possible flow execution using screenshots.......... 77 6.3 A screenshot of the generated view of the PurchaseCd flow.......... 78 6.4 A screenshot of a customized view of the ListCds flow............. 79 vi List of Figures List of Tables 1.1 Terminology......................................4 4.1 Definition of the MODF Java annotations..................... 56 4.2 Flow and FlowWithMultipleStates annotations............... 57 Listings 4.1 Flow interface of the PurchaseCd flow...................... 47 4.2 Flow interface of the ListCds flow........................ 48 4.3 Flow interface of the ListCDs flow (extended).................. 49 4.4 Flow interface of the DeleteCd flow........................ 49 4.5 Flow Interface of the Show CD Details flow.................... 51 4.6 Flow interface of the SearchCd flow using nested interfaces........... 51 4.7 Flow interface of the SearchCD flow without nested interfaces......... 52 5.1 Backing bean data types............................... 69 5.2 Definition of an application logic layer Spring bean................ 71 5.3 Example of a generated application logic layer wrapper.............. 72 5.4 Definition of an application logic layer wrapper Spring bean........... 72 List of Algorithms 4.1 Transformation of a Java-based MODF specification to a MODF model.... 58 vii Chapter 1 Introduction Implementation of user interfaces is a time consuming and repetitive process which involves creating and linking different layers, components, libraries, configuration files and similar ar- tifacts. Automatic generation of user interfaces aims to speed up the development process. Nevertheless, generation of user interfaces is a vague term in the sense that it is not clear what is generated. The contents of a user interface implementation