CONTEXT-AWAREUICOMPONENTREUSEFORWEB SERVICEDEVELOPMENTENVIRONMENTS
kerstin klemisch, mba supervisor: prof. boualem benatallah co-supervisor: ingo weber, phd
PhD Thesis
School of Computer Science and Engineering Faculty of Engineering
March 2015
[ Context-aware UI Component Reuse for Web Service Development Environments ] kerstin klemisch, mba CONTEXT-AWAREUICOMPONENTREUSEFORWEB SERVICEDEVELOPMENTENVIRONMENTS
[ Context-aware UI Component Reuse for Web Service Development Environments ] Kerstin Klemisch, MBA: Context-aware UI component Reuse for Web Service Devel- opment Environments, PhD Thesis, c March 2015
[ Context-aware UI Component Reuse for Web Service Development Environments ] Remember, we all stumble, every one of us. That’s why it’s a comfort to go hand in hand. — Emily Kimbrough
Dedicated to my family, Oliver, Wolfgang, Edith, Saskia, Sven and Britta.
[ Context-aware UI Component Reuse for Web Service Development Environments ] ABSTRACT
Adapting user interfaces (UIs) to various contexts, such as for the exploding number of different devices, or specific business processes in different compa- nies, has become a major challenge for UI developers. The support offered by current development environments for UI adaptation is limited, as is the sup- port for the efficient creation of UIs in web service-based applications. Even with sophisticated UI development environments, UI developers still encounter many repetitive, time-consuming tasks during the UI development process. In this thesis, we describe an approach where – based on a given context – a complete user interface is suggested. The suggestions are created by a rule- based recommender system, which combines web service-bound UI elements with other UI building blocks. Rules for the UI Layout, Theme (the style sheet), Binding of UI building blocks to web services and Composition of UI components are established, and saved in a knowledge base for later reuse. Rules are created automatically based on the creation or modification of UIs. The approach has been implemented, as well as evaluated by simulating the development of 115 SAP UI screens.
v
[ Context-aware UI Component Reuse for Web Service Development Environments ] The most important property of a program is whether it accomplishes the intention of its user — C.A.R. Hoare
ACKNOWLEDGMENTS
This dissertation represents a culmination of efforts, and has been made possible by the assistance and support of various parties.
I would like to extend a warm and sincere thank-you to my supervisors Prof. Boualem Benatallah and Dr. Ingo Weber, for their valuable feedback, immense knowledge, inspiration, guidance, constant support and advice.
My sincere thanks also goes my thesis panel, Prof. Paul Compton, UNSW, for his helpful advice, particularly in regards to RDR technologies, and Prof. Fethi Rabhi and Dr. Srikumar Venugopal, School of Computer Science and Engineer- ing, UNSW, for their encouragement, helpful questions and insightful comments.
I’m thankful to SAP Research, the University of New South Wales and Smart Services CRC Sydney for having given me the great opportunity to write a PhD thesis in collaboration with the IT industry.
Furthermore, I thank my fellow PhD students Van Hai Ho and Basem Suleiman, who have assisted me during my thesis, and for being great friends.
A big thank you also goes to Jan-Felix Schwartz, who assisted me during the creation of the prototype for this work, and Patrick de Guzman, who imple- mented a second prototype based on our approach for his honours thesis.
I would like to express my gratitude to Lyn Campbell-Anderson, Daniel Cic- ciarelli, Helen Conran, Vicki Korb, Leanne Mavridis, Bev McMasters, and Terry Southwell, who performed a final review of my thesis.
Last but not least, I would like to thank my husband, my friends and my family for their constant support and encouragement throughout this journey.
vi
[ Context-aware UI Component Reuse for Web Service Development Environments ] CONTENTS
1 introduction1 1.1 Background 1 1.2 Problem Statement 3 1.3 Contributions Overview 3 1.4 Thesis Organisation 4 2 background and related work6 2.1 Web Services 6 2.1.1 Web Service Definition 6 2.1.2 Service Interfaces 7 2.1.3 APIs and API platforms 9 2.1.4 Web APIs and Mashups 11 2.1.5 GUI Development for Web Services 12 2.1.6 Web Services – Discussion 14 2.2 UI Development 14 2.2.1 UI Components 15 2.2.2 UI Creation with Java Swing and Java NetBeans IDE 15 2.2.3 UI Creation in Microsoft Visual Studio 20 2.2.4 UIs at SAP Business ByDesign 25 2.2.5 UI Development with Bootstrap 30 2.2.6 UI Development with DukeScript 32 2.2.7 UI Development – Discussion 34 2.3 Code Reuse and Code Search 36 2.3.1 Code Reuse 36 2.3.2 Question & Answer Sites 39 2.3.3 Code Reuse and Code Search – Discussion 40 2.4 UI Patterns 41 2.4.1 Defining UI Patterns 41 2.4.2 Elements of Interaction Design Patterns 42 2.4.3 Reasons for using Patterns 43 2.4.4 UI Pattern Examples 44 2.4.5 Parties contributing to UI Patterns 45 2.4.6 The Pattern Approach at SAP 46 2.4.7 UI Patterns and their Usage in UI development 53 2.4.8 UI Patterns – Discussion 54
vii
[ Context-aware UI Component Reuse for Web Service Development Environments ] contents viii
2.5 UI and Context 54 2.5.1 Examples of Context requiring UI Adaptation 55 2.5.2 GUI Development and Context-Awareness 58 2.5.3 UI and Context – Discussion 61 2.6 Background and Related Work - Discussion 62 3 ui development knowledge, concepts and representation 65 3.1 Representing UI Components 65 3.2 Representing UI Recommendation Rules 66 3.2.1 Rule Conditions 67 3.2.2 Rule Conclusions 67 3.2.3 Data Structures for Rules 70 3.3 UI Development Knowledge, Concepts and Representation - Dis- cussion 74 4 ui knowledge acquisition 75 4.1 Context and UI Repository in the UI Recommender System 76 4.2 Investigation of SAP CRM User Interfaces 77 4.3 Rule Specification 80 4.4 Incremental UI Knowledge Acquisition 82 4.5 Confidence Score 83 4.6 Evolution of Rules 84 4.7 UI Knowledge Acquisition - Discussion 85 5 system architecture, implementation & knowledge base content 86 5.1 Deciding on a Knowledge Base Rule Paradigm 86 5.2 Prototypical Implementation of UISE 87 5.3 Class Structure for UISE 91 5.3.1 Classes forming the Rule Condition 92 5.3.2 Classes forming the Rule Conclusion 93 5.4 Knowledge Base Content Elicitation for UISE 96 5.4.1 Elicitation of the Device Hierarchy for UISE 96 5.4.2 Elicitation of the Business Scenario Hierarchy for UISE 103 5.5 Cross Platform & Context Web Services - WST 104 5.5.1 Design for WST 104 5.5.2 System Architecture and Implementation for WST 110 5.6 System Architecture and Implementation - Discussion 111 6 evaluation 112 6.1 Evaluation of UISE 112 6.1.1 Evaluation Objectives and Settings - UISE 112
[ Context-aware UI Component Reuse for Web Service Development Environments ] contents ix
6.1.2 Evaluation Results - UISE 114 6.2 Evaluation of WST 116 6.2.1 Goal of the Evaluation - WST 116 6.2.2 Evaluation Environment - WST 116 6.2.3 Evaluation Search by Keywords - WST 116 6.2.4 Experiment 1 Results - WST 118 6.2.5 Experiment 2 Results - WST 118 6.2.6 Experiment 3 Results - WST 122 6.3 Evaluation - Discussion 123 7 conclusion 128 7.1 Challenges 128 7.2 Summary 129 7.3 Future Research 129 a appendix 131 a.1 Examples for SAP CRM UIs and UI Elements 131 a.1.1 Sales Order Management UIs 131 a.1.2 Sales Order Management UI Elements 134 a.1.3 Service Order Management UIs 145 a.1.4 Service Order Management UI Elements 145 a.1.5 Contract Management UIs 164 a.1.6 Contract Management UI Elements 164 a.1.7 Examples of CRM UIs and UI Elements - Discussion 174
[ Context-aware UI Component Reuse for Web Service Development Environments ] LISTOFFIGURES
Figure 2.1 Consumer Mashup: Housingmaps.com 11 Figure 2.2 Data Mashup: RSOE EDIS 12 Figure 2.3 Enterprise Mashup: Staff Allocation Mashup seen on www.jackbe.com 13 Figure 2.4 Hierarchy of UI Components 16 Figure 2.5 UI Pattern Palette in NetBeans IDE 17 Figure 2.6 NetBeans IDE Design View 17 Figure 2.7 NetBeans IDE Source View 18 Figure 2.8 NetBeans IDE Property Editor 19 Figure 2.9 Simple UI Patterns in NetBeans IDE 19 Figure 2.10 Registering Events in NetBeans IDE 20 Figure 2.11 Simple Controls in Visual Studio 21 Figure 2.12 Data Grid View in Visual Studio 2008 22 Figure 2.13 Month Calendar Pattern in Visual Studio 2008 22 Figure 2.14 Examples of Controls and Shapes in Expression Blend [51] 23 Figure 2.15 Blend for HTML [93] 24 Figure 2.16 Silverlight Custom Button in Expression Blend [116] 24 Figure 2.17 Patterns in the SAP UI Designer 26 Figure 2.18 Defining the Data Model in the UI Designer 26 Figure 2.19 Data Binding 27 Figure 2.20 Adding the Hierarchical Extension to the Data Model 27 Figure 2.21 Sales Order Management in SAP Business ByDesign- Min- imum Layout 28 Figure 2.22 Sales Order Management in SAP Business ByDesign - Max- imum Layout 29 Figure 2.23 Hiding Fields or displaying additional ones in SAP Busi- ness ByDesign 29 Figure 2.24 Commercial Bootstrap Themes available on WrapBootstrap 31 Figure 2.25 Free Bootstrap Themes available on BootsWatch 31 Figure 2.26 Labels belonging to a Bootstrap Theme 32 Figure 2.27 Carousel UI Component in Bootstrap 32 Figure 2.28 Setting up a Project in DukeScript 33 Figure 2.29 Deploying the Project for NetBeans 34
x
[ Context-aware UI Component Reuse for Web Service Development Environments ] List of Figures xi
Figure 2.30 “Hello World” Program for HTML and Java NetBeans 35 Figure 2.31 Choosing the Target Platform 36 Figure 2.32 Tag Cloud (www.flickr.com), as shown on [109] 45 Figure 2.33 Calendar Picker Pattern [105] 45 Figure 2.34 Hierarchy of UI Patterns at SAP Business ByDesign [118] 46 Figure 2.35 Controls constituting Building Block Elements [118] 47 Figure 2.36 Building Block Elements [118] 48 Figure 2.37 Workcentre Floorplan with Building Blocks [118] 49 Figure 2.38 Floor Plans in SAP UI Design [118] 50 Figure 2.39 Work Centre Pattern in SAP Business ByDesign (Extract) 50 Figure 2.40 Guided Activity Pattern in SAP Business ByDesign (Ex- tract) 51 Figure 2.41 The UI Pattern Concept at SAP [4] 52 Figure 2.42 Standard Sales Order in SAP CRM 4.0, Transaction CRMD_- ORDER 56 Figure 2.43 Mobile Sales for Handheld 5.0 57 Figure 3.1 ER-Model of Rule Components 66 Figure 3.2 Composition of UIs by combining UI elements 68 Figure 3.3 Examples for different Layouts 69 Figure 3.4 Stylesheets for different Banks 70 Figure 3.5 Sales Order UI bound to different Web Services 70 Figure 3.6 Representation of UI “Create Standard Sales Order Mo- bile” on the Database Level 71 Figure 3.7 Representation of UI “Create Standard Sales Order Mo- bile” on the Database Level 73 Figure 4.1 Proposed Architecture of the Recommender System 75 Figure 4.2 Example of a Device Hierarchy 76 Figure 4.3 Sales Order UI Quotation 78 Figure 4.4 UI Component Sales Header 4 78 Figure 4.5 UI Component Sales Date Section 2 78 Figure 4.6 UI Component Sales Item List 1 79 Figure 4.7 Replenishment Order UI 80 Figure 4.8 UI Component Sales Date Section 1 80 Figure 4.9 Rules in our Approach, featuring four Dimensions in the Conclusion 81 Figure 5.1 Choosing the Device in UISE 89 Figure 5.2 Architecture of the Recommender System 90
[ Context-aware UI Component Reuse for Web Service Development Environments ] List of Figures xii
Figure 5.3 Suggested Create Sales Order UI in UISE and Editing Func- tionalities 91 Figure 5.4 Recommender System: Knowledge Acquisition (top: User; bottom: System) 92 Figure 5.5 Class Diagram for the UISE prototype 95 Figure 5.6 Device Hierarchy used for MDBF 97 Figure 5.7 Device Identification used for Volantis 98 Figure 5.8 Device Format used for Volantis 98 Figure 5.9 Device Hierarchy used for Volantis 99 Figure 5.10 Device Hierarchy used for WURFL 100 Figure 5.11 Device Hierarchy used for UAProf 101 Figure 5.12 Business Scenario Hierarchy in UISE (Extract) 103 Figure 5.13 Data Model for representing UI Widgets in [38] 105 Figure 5.14 Example of a Composition in [38] 106 Figure 5.15 Example of Theme and various Templates in [38] 106 Figure 5.16 Example of Device Hierarchy in [38] 107 Figure 5.17 Example of Business Scenario Hierarchy in [38] 108 Figure 5.18 Concrete Example of Data Store in Data Base in [38] 109 Figure 5.19 System Architecture in [38] 110 Figure 6.1 Knowledge Base Size vs. Number of UIs 114 Figure 6.2 Changes for Sales Order, Contract, and Service Order UIs 115 Figure 6.3 Results of Search by Keyword for Widget Search Tool in [38] 119 Figure 6.4 Results of Search by Keyword for Google in [38] 122 Figure 6.5 Precision Measure for Search by Keyword in [38] 124 Figure 6.6 Results of Search by Context for Widget Search Tool in [38] 125 Figure 6.7 Results of Search by Context for Google in [38] 125 Figure 6.8 Precision Measure for Search by Context in [38] 126 Figure 6.9 Result of negative Search for Widget Search Tool in [38] 126 Figure 6.10 Result of negative Search for Google in [38] 127 Figure 6.11 Precision Measure for negative Search in [38] 127 Figure A.1.1 Standard Sales Order in SAP CRM 131 Figure A.1.2 Telesales Sales Order in SAP CRM 132 Figure A.1.3 Quotation in SAP CRM 132 Figure A.1.4 Web Auction Quotation in SAP CRM 133 Figure A.1.5 Replenishment Order in SAP CRM 133 Figure A.1.6 Sales Header Element 1 134
[ Context-aware UI Component Reuse for Web Service Development Environments ] List of Figures xiii
Figure A.1.7 Sales Header Element 2 135 Figure A.1.8 Sales Header Element 3 135 Figure A.1.9 Sales Header Element 4 137 Figure A.1.10 Sales Header Element 5 137 Figure A.1.11 Sales Header Element 6 138 Figure A.1.12 Sales Header Element 7 138 Figure A.1.13 Sales Header Element 8 138 Figure A.1.14 Sales Header Element 9 139 Figure A.1.15 Sales Date Section Element 1 140 Figure A.1.16 Sales Date Section Element 2 141 Figure A.1.17 Sales Date Section Element 3 141 Figure A.1.18 Sales Date Section Element 4 142 Figure A.1.19 Sales Item List Element 1 144 Figure A.1.20 Sales Item List Element 2 144 Figure A.1.21 CD Service Order in SAP CRM 145 Figure A.1.22 FSL Service Order in SAP CRM 146 Figure A.1.23 ISA Service Order in SAP CRM 146 Figure A.1.24 Online Pricing in SAP CRM 147 Figure A.1.25 Order Quotation MorePriAc in SAP CRM 147 Figure A.1.26 Service Order MorePr in SAP CRM 148 Figure A.1.27 Package Quotation in SAP CRM 148 Figure A.1.28 Service Order Header Element 1 149 Figure A.1.29 Service Order Header Element 2 150 Figure A.1.30 Service Order Header Element 3 150 Figure A.1.31 Service Order Header Element 4 150 Figure A.1.32 Service Order Header Element 5 150 Figure A.1.33 Service Order Business Partner Element 1 151 Figure A.1.34 Service Order Business Partner Element 2 152 Figure A.1.35 Service Order Business Partner Element 3 152 Figure A.1.36 Service Order Business Partner Element 4 152 Figure A.1.37 Service Order Business Partner Element 5 153 Figure A.1.38 Service Order Business Partner Element 6 153 Figure A.1.39 Service Order Business Partner Element 7 153 Figure A.1.40 Service Order IBase Section 1 155 Figure A.1.41 Service Order Date Section 1 156 Figure A.1.42 Service Order Date Section 1 156 Figure A.1.43 Service Order Date Section 3 156 Figure A.1.44 Service Order Date Section 4 157
[ Context-aware UI Component Reuse for Web Service Development Environments ] Figure A.1.45 Service Order Priority Section 1 157 Figure A.1.46 Service Order Priority Section 2 158 Figure A.1.47 Service Order Priority Section 3 159 Figure A.1.48 Service Order Priority Section 4 159 Figure A.1.49 Service Order Priority Section 5 159 Figure A.1.50 Service Order Problem Section 1 161 Figure A.1.51 Service Order Problem Section 2 161 Figure A.1.52 Service Order Problem Section 3 161 Figure A.1.53 Service Order Item Section 1 163 Figure A.1.54 Service Order Item Section 2 163 Figure A.1.55 Service Order Item Section 3 163 Figure A.1.56 Service Order Item Section 4 164 Figure A.1.57 ECC Quantity Contract in SAP CRM 164 Figure A.1.58 ECC Value Contract in SAP CRM 165 Figure A.1.59 Quantity Contract in SAP CRM 165 Figure A.1.60 Ship and Debit Contract in SAP CRM 166 Figure A.1.61 Subscr.-Loose.Pub in SAP CRM 166 Figure A.1.62 Individual Contract in SAP CRM 167 Figure A.1.63 Service Contract Header Element 1 168 Figure A.1.64 Contract Header Element 1 168 Figure A.1.65 Contract Header Element 2 169 Figure A.1.66 Contract Header Element 3 169 Figure A.1.67 Contract Header Element 4 169 Figure A.1.68 Service Contract Date Section Element 1 170 Figure A.1.69 Service Contract Date Section Element 2 170 Figure A.1.70 Service Contract Date Section Element 3 170 Figure A.1.71 Contract Date Section Element 1 171 Figure A.1.72 Contract Date Section Element 2 171 Figure A.1.73 Contract Date Section Element 3 171 Figure A.1.74 Service Contract Item Section Element 1 172 Figure A.1.75 Service Contract Item Section Element 2 172 Figure A.1.76 Service Contract Item Section Element 3 173 Figure A.1.77 Contract Item Section Element 1 173 Figure A.1.78 Contract Item Section Element 2 173 Figure A.1.79 Contract Item Section Element 3 174
xiv
[ Context-aware UI Component Reuse for Web Service Development Environments ] Figure A.1.80 Contract Item Section Element 4 174
LISTOFTABLES
Table 2.1 Comparison of Code Reuse Approaches 39 Table 2.2 UI Pattern Approaches and Communities 54 Table 2.3 Comparison of cross-Platform GUI Toolkits 60 Table 2.4 Comparison of HTML5 Mobile Development Frameworks 61 Table 2.5 Comparison of Related Work 63 Table 5.1 Reuse-API 88 Table 5.2 Build-API 88 Table 6.1 Test Cases for Experiment 1 in [38] 118 Table 6.2 Test Cases for Experiment 2 in [38] 121 Table 6.3 Test Cases for Experiment 3 in [38] 123
ACRONYMS
ICT Information and Communications Technology
UI User Interface
API Application Programming Interface
IDE Integrated Development Environment
WS Web Service
WSDL Web Service Description Language
SOAP Simple Object Access Protocol
CRM Customer Relationship Management
XSD XML Schema Definition
xv
[ Context-aware UI Component Reuse for Web Service Development Environments ] acronyms xvi
XML Extensible Markup Language
ERP Enterprise Ressource Planning
UISE UI Suggestion Environment
URI Uniform Resource Identifier
HTTP Hypertext Transfer Protocol
RPC Remote Procedure Call
REST Representational State Transfer
JSON Javascript Object Notation
XHTML Extensible HyperText Markup Language
ASP Application Service Providers
SaaS Software as a Service
EDIS Emergency and Disaster Information Service
RSOE National Association of Radio Distress-Signalling and Infocommunications
WPF Windows Presentation Foundation
MIME Multi-Purpose Internet Mail Extensions
REST Representational State Transfer
SOA Service Oriented Architecture
SAP Systems Applications Products in Data Processing iOS iPhone Operating System
SME Small and Medium Enterprises
BO Business Object
MS Microsoft
[ Context-aware UI Component Reuse for Web Service Development Environments ] acronyms xvii
CSS Cascading Style Sheets
JS JavaScript
DOM Document Object Model
JVM Java Virtual Machine
AJAX Asynchronous JavaScript And XML
Q&A Question & Answer
OOPSLA Object-Oriented Programming, Systems, Languages & Applications
PDA Personal Digital Assistant
PC Personal Computer
UX User Experience
MDA Mobile Digital Assistant
TV Television
KB Knowledge Base
MVC Model View Controller
ASP Application Server Protocol ascx Active Server Controls eXtended aspx Active Server Methods eXtended
RDR Ripple Down Rules
SCRDR Single Classification Ripple-Down Rules
MCRDR Multiple Classification Ripple-Down Rules
CRDR Collaborative Ripple-Down Rules
MDBF Mobile Device Browser File
XDIME XHTML Device Independant Markup Extensions
WURFL Wireless Universal Ressource File
[ Context-aware UI Component Reuse for Web Service Development Environments ] acronyms xviii
DDR Device Description Repository
PHP Personal Home Page
RDF Resource Description Framework
CDMA Code Division Multiple Access
BREW Binary Runtime Environment for Wireless
GSM Global System for Mobile Communications
WAP Wireless Application Protocol
UAProf User Agent Profile Specification
B2B Business to Business
B2C Business to Consumer
ISA Internet Sales Application
BOB Business
CD Collections and Disbursements
GS Goods Supplier
WST Widget Search Tool
[ Context-aware UI Component Reuse for Web Service Development Environments ] 1 INTRODUCTION
1.1 background
There are few Information and Communications Technology (ICT) areas as eco- nomically and socially critical today as the provision of services over mobile and Web channels. This trend profoundly impacts the effectiveness of services de- livery in a variety of domains including health, banking, education, healthcare, meteorology, forecasting, media, and office tasks. For instance, over 1.2 million Apple applications were accessible in June 2014. Apple was neck-to-neck with their competitor Google, who likewise had an estimated number of 1.2 million apps on offer [85]. From a software engineering point of view, while advances in mobile and Web technologies increased the ability to deploy simple services and devices, the demand for effective development of mobile applications is rising even faster. More specifically, the development of user interfaces has been identified as one of the most time-consuming tasks in the overall application development cycle [132]. This is partly due to the fact that user interfaces have to be developed for a large number of different devices with different development platforms, such as XCode for Apple iPhones and iPads, Android SDK for Android mobile phones, or Carbide IDE for Symbian applications [63]. Modern Integrated Development Environments (IDEs) support User Interface (UI) developers by providing: reusable basic UI elements (e.g., text boxes, sliders) from generic programming libraries (e.g., JQuery [101], VCL [129]), code gener- ation / completion for both UI and functionality as in Microsoft (MS) Visual Studio, UI to functionality binding specification, etc. However, even with sophis- ticated IDEs like Microsoft Visual Studio or Bootstrap [122], there are still many repetitive, time-consuming tasks that UI developers have to code manually. Ex- amples of such tasks are the repetitive drag and drop of basic UI elements (e.g., text boxes, buttons) onto a canvas, creation of UI elements from scratch, config- uration of UI element parameters (e.g., size), specification of UI screen layouts, definition of labels and descriptions. In addition to describing UI elements, de- velopers need to develop mappings from UI elements to backend functions and
1
[ Context-aware UI Component Reuse for Web Service Development Environments ] 1.1 background 2
vice versa (e.g., mapping Web form fields to Web Service (WS) parameters, or WS invocation results to Web widgets). In this work, we focus on improving productivity of UI development on top of web services, as web services are widely used to provide backend interfaces to a range of applications from Enterprise Ressource Planning (ERP) software to cloud services. A good example to illustrate the reuse of backend functional- ity via services is Twilio [107], a provider of various Application Programming Interfaces (APIs) for messaging services such as telephony and SMS. A large number of applications have been developed on top of Twillio in a variety of domains. For instance, recently Twilio announced that 150,000 developers used its APIs to support phone calls, video conferencing and chat features including the development team of eBay and Hulu. Application development over services such as Twilio is UI intensive. When offering a service in different contexts, its UI has to be adapted to these contexts, including, e.g., the adaptation to new consumption channels, new audiences, and the change of UIs as an outcome of usability testing [33]. In addition, in enterprise applications, the adaptation to business scenarios is a major requirement in UI development. A business scenario is essentially a “complete description of a business problem” [104]. Examples of business sce- narios are sales order management and supply chain management. A business scenario can be associated with a collection of reusable UI elements including UI templates, backend services, and mapping templates between the two. Adapting UI code to a given context can be complex, time-consuming and resource-intensive. In major software development projects, various techniques are used to create appropriate UI prototypes before the development phase starts. These techniques include brainstorming, mockup design iterations by experi- enced UI designers, and usability testing. Existing UI development and adapta- tion techniques have not kept pace with our ability to deploy individual devices and services. They rely on human understanding of different contexts, platforms, devices and extensive manual programming to develop UI components. This is clearly unrealistic in large scale and evolving environments. Main stream code reuse techniques assist developers in finding and reusing general code artefacts, such as functions and methods [66, 87]. Although these techniques have pro- duced promising results that are certainly useful, more advanced techniques that cater for effective and context-aware UI components reuse are needed. Whereas the backend functionality provided by code might be exactly the same on a desk- top and a mobile device, the UI is likely to be different.
[ Context-aware UI Component Reuse for Web Service Development Environments ] 1.2 problemstatement 3
1.2 problem statement
According to the challenges for UI development discussed in the previous sec- tion, we face the following problems:
• How can we represent UI artefacts and their major characteristics such as their layout, their look and feel, the way the artefacts are combined with other UI artefacts, the binding of UI artefacts to the underlying functional- ity? How can we give recommendations for UI artefacts based on a given context such as devices and business scenarios? How can this context be represented?
• How can we build a recommender system that can incorporate new knowl- edge over time, with minimal input from the developers? How can we offer the acquired knowlege for reuse?
• How can we package the named functionality into a tool that is efficient and effective? How can we validate our approach?
1.3 contributions overview
In practice, we observe that UI developers often have valuable knowledge for identifying UI components that are most appropriate in a given context (e.g., UI components appropriate for sales order entry screens). We believe that shar- ing this knowledge is beneficial for UI code reuse, and thus that integrating context-ware UI components reuse and Service Oriented Architecture (SOA) of- fers tremendous opportunities to increase productivity of modern application development frameworks. More specifically, based on the above observations we propose a novel approach for context-aware UI component reuse, making the following contributions:
1. We perform an analysis of the “state of the art” UI development. This includes the analysis of current UI development IDEs and the way they provide support to the UI developer, as well as the investigation of works in research discussing UI development for web services, code reuse and UI patterns, and the adaptation of UIs to context.
2. We propose a UI artefacts representation model and a rule-based UI com- ponent recommender system. The recommender system suggests compre-
[ Context-aware UI Component Reuse for Web Service Development Environments ] 1.4 thesis organisation 4
hensive UI components to developers. UI Programming knowledge is ex- ploited in the form of programming recommendations provided during UI development. In essence, the recommender system uses a context descrip- tion (e.g., device type, business scenario) to query a “UI programming knowledge base”, which returns UI components that are “appropriate” for the given context.
3. We propose an incremental knowledge acquisition technique, by which newly created or modified UI components are associated to contexts and stored in the UI programming knowledge base for future reuse. The UI programming knowledge underpins knowledge-driven and context-aware UI components recommendations.
4. We discuss an evaluation of the proposed approach, including (i) two proof- of-concept prototypes called UI Suggestion Environment (UISE) and Widget Search Tool (WST) ; and (ii) a detailed feasibility and usefulness experi- ment based on 115 UIs from the SAP Business Suite Customer Relationship Management (CRM) software.
1.4 thesis organisation
The remainder of this work is divided in two major parts: First we describe the underlying concepts of our work, then we show the prototypical implementa- tion and validation of our approach. Chapter 2 reflects on the UI development process and UI design support through current IDEs. It introduces us to the concept of UI patterns and their usage. It furthermore explains and compares work in research related to code reuse and code search, the adaptation of UIs to context, UI development for web services, and concepts of reuse for UIs. The representation of UI components and UI recommendation rules in our ap- proach is discussed in Chapter 3. This includes a discussion of the rule data structure. Chapter 4 introduces the UI recommender system, which suggests UIs to the developer based on context. This chapter furthermore reflects on how UI recom- mendation rules are specified and how knowledge is acquired. The architecture and implementation of the two proof-of-concept prototypes is presented in Chapter 5, which includes the description of the elicitation of con- text.
[ Context-aware UI Component Reuse for Web Service Development Environments ] 1.4 thesis organisation 5
Finally, Chapter 6 discusses the objectives and outcome of the evaluation.
Some ideas and figures have appeared previously in the publication Context- aware UI component Reuse [52].
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2 BACKGROUNDANDRELATEDWORK
In the “Background and Related Work” chapter, we introduce the foundations on which this work builds, and position our contributions in a bigger context. In the first part of this chapter (Section 2.1), we introduce the concept of web ser- vices, discuss commonly used service interfaces, and explain the nature of (web service) APIs, API platforms and Mashups. Furthermore, we perform an investi- gation of work around Graphical User Interface (GUI) development approaches for web services. In Section 2.2, we present current UI development environments such as Java Swing and Java Net Beans, MS Visual Studio and the UI Designer used at SAP Busi- ness ByDesign, and cross-platform APIs Bootstrap and DukeScript, and explore how they support the UI development process. The reuse of and search for code is discussed in Section 2.3. Section 2.4 is dedicated to the history, nature and use of UI patterns. They repre- sent common guidelines for UI development and foster reuse of UI components. We conclude with an investigation of current approaches for the creation of UIs related to context, and setting them into perspective to our work (Section 2.5).
2.1 web services
In this section, we introduce the terms web services, web service interfaces and data interchange formats. Service Interfaces, APIs and API platforms, Web APIs and Mashups are furthermore investigated. We conclude this section with a dis- cussion of development approaches for web services .
2.1.1 Web Service Definition
W3C[113] defines web services as “a software system identified by a Uniform Resource Identifier (URI)” , “whose public interfaces and bindings are defined and described using Extensible Markup Language (XML)”. The definition of a web service can be discovered by other software systems, who may then interact
6
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 webservices 7 with the web service in a manner prescribed by its definition, making use of XML based messages conveyed by Internet protocols. Web services can be described by the following characteristics [43]:
• Self-contained: On the server-side, a web-service requires a web server and a servlet engine. On the client-side however, no additional software is needed. A programming language that supports XML and Hypertext Transfer Protocol (HTTP)-clients is sufficient. Client and server can thereby reside in different environments.
• Self-describing: In order to deploy a web service, client and server have to be able to interpret the format and content of a request and response message. There is no need for external meta data repositories or code gen- eration tools.
• Modular: Simple web services can be combined to more complex web ser- vices by a) the use of work flow techniques or b) by calling lower layer web services from a web service implementation.
• Platform-independent: Being based on a set of open, XML-based stan- dards, web services allow for the interoperability of web services and clients across a number of different platforms and programming languages.
Web services can be used for a large variety of functions, e.g., weather reports, credit checks, stock quotations, airline reservation processes [23]. Having ex- plained the term “web service”, we explain the nature of service interfaces in the following section.
2.1.2 Service Interfaces
Web services have an interface that is machine-readable. It can be maintained in the form of Web Service Description Language (WSDL), a standardised for- mat which describes network services as a set of endpoints. It allows service providers to describe the format of requests to their systems independent of the underlying run-time implementation [45]. The communication of web services with other machines is provided by Simple Object Access Protocol (SOAP) messages. SOAP defines a protocol for exchang- ing structured data in the implementation of web services in computer networks. Messages defined by SOAP consist of three parts [44]:
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 webservices 8
• Envelope. The envelope constitutes a framework for processing a message. The SOAP message consists of an envelope with zero or more header sec- tions and exactly one body section. Control information such as quality-of- service attributes are stored in the header, whereas the body contains the message identification and its parameters.
• Encoding Rules. SOAP defines a XML Schema Definition (XSD)-based data type scheme which is independent of programming languages. In addition, it provides encoding rules for data types defined according to this scheme. Encoding rules enable the exchange of instances of application-based data types.
• Communication Style. SOAP supports two kinds of communication styles: Remote Procedure Call (RPC) and a document-based style, also known as document-oriented or message-oriented style.
An alternative to WSDL-based interfaces is Representational State Transfer (REST), which is used by major representatives of Web 2.0 such as Google, Yahoo and Facebook. REST adheres to four basic principles (see [90]), which are:
• The explicit use of HTTP methods. According to REST’s principles, HTTP methods have to be used in accordance with RFC 2616 [37], e.g., GET is supposed to be used for the retrieval of data from a web server, but not for transactional operations such as adding records to a database.
• Statelessness. In order to meet the requirements of increasingly high per- formance demands, REST messages have to contain all data necessary for performing a request, without data being stored in a local state between re- quests. This enables the use of performance-improving measures like load balancing, proxies and gateways, as messages can be forwarded from one server to another.
• The exposition of directory structure-like URIs. REST web service URIs shall be easy to understand, so that the purpose and functionality of a web service can be predicted from the URI alone. In order to achieve this, REST suggests the use of a directory structure, such as in the URI “http: //www.myservice.org/discussion/topics/{topic}”. This URI denotes a discussion threading service which is used for collecting various topics.
• The transfer of XML, Javascript Object Notation (JSON), or both. The data which is exchanged between the application and the service in the http-
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 webservices 9
body or the request / response payload should be kept simple and human- readable. Furthermore, the relationships between the data objects should be reflected. The service should be constructed in a way that allows clients written in different languages and running on different platforms to deploy a service which is most suitable to them. In order to achieve this, RESTful web services use HTTP accept headers and MIME types of type JSON, XML and Extensible HyperText Markup Language (XHTML).
The previous paragraph mentioned JSON, or JavaScript Object Notation, which is a light-weight data interchange format [49]. Despite being based on a subset of the Javascript Programming Language, it is language-independent, and provides parsers for many languages. JSON can be used for serializing and transmitting data over a network connection. As an alternative to XML, JSON is mostly used for transmitting data between a server and web applications [125]. The following sections deal with APIs and API platforms, which play a role in the implementation of web service functionalities.
2.1.3 APIs and API platforms
The implementation of web service functionalities is supported by APIs and API platforms. There are a variety of APIs and API platforms as follows. APIs specify software components and their operations, inputs, outputs and re- lated types. The purpose of an API is the definition of a set of functionalities independent of their implementation [120]. API management platforms, such as Mashery [62], consist of several compo- nents assisting with managing the API. The Mashery Partner Portal can be used to launch online portals for supporting developer partners, ease key provision- ing and enable reporting, e.g., on the methods developers are using. In addition, the portal serves as a support forum and developer blog, and as a publishing platform for interactive API documents. The Mashery API Control Center has been designed for managing different APIs from a central place, and providing limits, quotas and privileges to development partners. An API Packager gives control over resource packaging and assists with defining access plans without coding. Detailed Activity Reports and partner monitoring is provided by the Mashery Reporting and Analytics section. Apigee’s API Platform [3] assists developers with the creation of apps. Apigee provides developer channel services which ease the adoption of developers and the creation of a developer community. Gateway Services can be used for creat-
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 web services 10
ing, managing and scaling APIs. App Services handle data conversions, sign in/sign up, storage, server maintenance and thereby act as a “Backend-as-a- Service” solution. The detection, diagnosis and maintenance of mobile apps is supported by Mobile Analytics. They are part of the Analytics Services which offer end-to-end visibility of the API ecosystem from the API to mobile apps. Alcatel-Lucent’s ProgrammableWeb (Alcatel-Lucent APIs Methodology, see [60]) is a search engine for released network operator and web interfaces, and the Open API Platform, which can handle management and accounting functions for all technical and commercial relationships between network operators and developers/ service providers. ProgrammableWeb is a repository of 2000 Web APIs and includes interfaces for Google Maps, Flickr and YouTube [2]. Enterprise Services was invented in 2002 by the chairman of the SAP AG, Hasso Plattner. The Enterprise Services architecture consists of reusable elements, also called modules, which are formed from layers of components aggregating data and application functions [48]. Application Service Providers (ASP) provide computer-based services to cus- tomers over a network. Software using the ASP model is often referred to as “software on-demand” or “software as a service” (SaaS)[121]. There are furthermore APIs for the Internet of Things such as Xively [130], a public cloud for the Internet of Things. Xively provides a developer work- bench and developer centre with API guides, tutorials and videos. It supports many platforms, gateways and devices and selective data sharing. Via the Xively Connected Object Cloud, devices, apps and services can be interconnected with third-party devices. Apart from the APIs named above, the market offers APIs for business services, such as the FedEx Web Services API [28]. FedEx offers shipping services that can be integrated into business systems, retail websites, or order management systems in order to, e.g., create shipping labels, facilitate returns, track shipments and generate reports. Apart from the API management platforms named above, innovative ideas change the API world. App stores, such as for Apple and Android, offer a platform for a growing number of apps. In June 2014, Apple announced that the iPhone Op- erating System (iOS) App Store had reached 1.2 million applications, and had al- ready encountered 75 million downloads. Apple thereby was neck-to-neck with competitor Google, who likewise had an estimated number of 1.2 million apps on offer [85].
In the following section, we introduce Web APIs and different types of mashups.
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 web services 11
2.1.4 Web APIs and Mashups
Web-APIs consist of a number of HTTP request messages, combined with the definition of the structure of response messages, typically expressed in JSON or XML [5]. They enable the easy combination of web services into new services, web sites and web applications, so-called mash-ups, and play an important role in Web 2.0. Mashups consist of a combination of data, functionality and/or presentation [84]. We distinguish three different types of mashups:
• Consumer Mashups are aimed at the general public. When offered to- gether with a web-based mashup facility, consumer mashups can be an ef- fective means to customise and personalise data and views. Housingmaps.com (see Fig. 2.1) provides an example for consumer mashups, combining craiglist real estate listings with Google Maps.
Figure 2.1.: Consumer Mashup: Housingmaps.com
• Data Mashups combine similar data from various sources into one repre- sentation. Fig. 2.2 shows the Emergency and Disaster Information Service (EDIS) of the National Association of Radio Distress-Signalling and Infocom- munications (RSOE), which derives data such as serious weather conditions, biohazard threats, seismic information from about 200 different sources, and displays them together on one map.
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 web services 12
Figure 2.2.: Data Mashup: RSOE EDIS
• Enterprise Mashups, also called business mashups, allow for the collabo- ration between developers and the business. Agile development projects, where developers and customer proxies have to collaborate to define and implement business requirements, can be supported by enterprise mashups. Enterprise mashups differ from consumer mashups by the degree of inte- gration with business computing environments, access control and security, governance, and as well by the complexity of the tools used for creating mashups. An example of an enterprise mashup is shown in figure 2.3.
2.1.5 GUI Development for Web Services
In this paragraph, we contemplate GUI development approaches for web ser- vices in general, which do not take contextual factors of any kind into account. The article of [111] focuses on an e-government scenario. The work treats the de- velopment of e-government services for multiple channels, whereat channels in this case comprehend different platforms such as mobile technologies, Internet
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.1 web services 13
Figure 2.3.: Enterprise Mashup: Staff Allocation Mashup seen on www.jackbe.com and desktop applications. The approach is limited insofar as no user guidance is provided if multiple channels of the same platform, such as desktop applications with differing screen sizes, are created. This however is given in our approach by including rules based on the characteristics of the platform such as screen size and resolution. The ServFace project aims to enable the non-technical user to create applications from annotated web services (see [94], [47], and [29]) .Like [111], the ServFace project aims at a multi-channel approach and provides platform-independent development models. [29] supports the creation of user interfaces as well as the modelling of user interactions in task-driven software development approaches. Like in [47], the concept is based on the introduction of annotations. Annotations are also used in the Dynvoker tool [98]. All named work related to ServFace lack a feature which is provided in our approach: Context in terms of business sce- narios is not taken into account. There is no guideline provided to the user on how a UI has to look in certain scenarios. [82] tackles the creation of user interface from independent, loosely coupled modules with a framework based on ontologies. It aims at reducing the complex-
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 14 ity of large UI development projects via modularisation. In [83], an approach for the integration of heterogeneous UI components is created. Modularity and at the same time interoperability of the components are supposed to be preserved. Ontologies serve as a way to exchange events and data between the components. The exchange of data between components is out of the scope of our approach. The FAST project [42] establishes a concept for enterprise mashups. In contrast to traditional solutions, FAST does not allow for the mash up of heterogeneous data sources, but proposes a screen flow design resulting in so-called gadgets. A FAST ontology is introduced to describe the characteristics of complex gadgets (graphical elements, user interaction models, data flows), thereby the approach partly resembles the work presented in [82]. The disadvantage of these approaches is that the ontology has to be created before the solution can be used. Our approach is based on an incremental acqui- sition of knowledge, starting with an empty knowledge base which is gradually built up.
2.1.6 Web Services – Discussion
The development process for applications based on web services is supported by various APIs and API platforms, Mashup tools and research approaches that support and automate the code creation. Enterprise application platforms assist with the creation of corporate apps. App stores fulfill similar tasks in regards to consumer apps. The main focus of the named services lies on the backend functionality, providing functionality in the form of “backend as a service”. In that regard, there have been a lot of improvements in regards to organizing and using back end functionality. However, the same improvements cannot be detected in the UI space. Approaches are required that assist with making UIs and UI components reusable, and provide more UI development support.
2.2 ui development
This section reflects on the process of UI development with wide-spread UI Frameworks such as Java Swing, Java NetBeans and IDE MS Visual Studio. It furthermore investigates UI creation with the SAP-owned UI framework “UI Designer”, which is used for the development of the SAP Business ByDesign ap- plication. We focus on the usage of UI components in the different frameworks,
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 15 and on the level of support the frameworks provide to UI developers. Before discussing the UI Frameworks, the term “UI component” is introduced.
2.2.1 UI Components
UI components are used by various IDEs as a means to support the UI devel- opment process. They are defined as “reusable, design-system specific chunks of a page” [17]. Depending on the design context, UI components may also be referred to as widgets, blocks, modules, chunks and portlets. A view or page is created by combining several UI components, with each component occupying a certain function within a page grid. Fig. 2.4 shows how UI components can be grouped within a hierarchical struc- ture. We distinguish UI Components of different granularity, starting with
• Basic UI components such as text fields, labels, sliders. They are on the lowest level of our hierarchy, and are represented by very simple, generic components.
• More complex generic composite UI components such as calendar pickers. They are composed of basic UI components, and show a higher degree of specialisation.
• Composite UI components which are specific to a certain domain, such as sales order management headers or purchase order lists. These are highly specialised and complex components.
Examples for these UI components are visible in Fig.2.4.
2.2.2 UI Creation with Java Swing and Java NetBeans IDE
The traditional GUI creation with Java Swing happens purely through coding. Java Swing classes like JFrame (a top-level window with a title and a border), JLabel (labels), JButton (buttons) can be used to create a UI from scratch. The UI developer has full control over the user interface and its underlying functionality, however, the UI creation itself is relatively time-consuming and error-prone. The appearance of the UI can only be reviewed on compiling and exerting the code in a repetitive process. Java NetBeans IDE eases the process of UI creation with Java Swing by offering predefined simple UI patterns for the typical Java Swing
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 16
Domain-specific IBM Custom Proper es composite UI components SAP Note Table
Generic
Specialisa on composite UI components Autocomplete Calender Picker
Tex ield Bu on Label Basic UI Slider components
Figure 2.4.: Hierarchy of UI Components classes. Labels (JLabel), buttons (JButton), sliders (JSlider) a.o. can simply be dragged onto the screen from a palette [100]. The UI can be constructed from UI components directly in the Design Area. The future appearance of the UI is visible and adjustable at every stage of the development process and before having compiled the code. The UI developer can also toggle between two views: the design view, where the UI is displayed, and the source view, which contains the source code of the application. The design view in Fig. 2.6 contains a JFrame object, recognisable by its blue frame. When dragging the JFrame object into the design view, the IDE auto- matically generates the code displayed in Fig. 2.7 between the blue, uneditable sections. The code specifies the patterns typical appearance and behavior such as exiting the application on clicking the close button. The properties of the UI pattern can be changed in the property editor (see Fig. 2.8, here displaying the properties of the JFrame object). Without access- ing the source code, properties such as the background colour or the window’s
[ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 17
: Palette 13 Swing ..., Jlabel r;;;J JButton r;;;J JToggleButton s- JCheci ~ : ButtonGroup CEJ JComboBox ~ JUst o JT extField 0 JPanel eJ JTabbedP ane lllll[ JScroiiBar bll JScroiiPane ~ JPopupMenu Figure 2.5.: UI Pattern Palette in NetBeans IDE ~ CelsiusConverterGUI.java • I 8IB G ~------~------~ Source [ Design J l [§] ~ ~ I l:.l ~I! Ji I * $ Figure 2.6.: NetBeans IDE Design View [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 18 Figure 2.7.: NetBeans IDE Source View bounds can be intuitively changed by editing the row assigned to a specific prop- erty. Fig. 2.9 shows a user interface with a text field, two labels and a button added to the frame. The IDE provides visual cues helping to align the different compo- nents to each other. The buttons’ and labels’ names can be changed by double- clicking the components. The IDE offers furthermore support for adding application logic. Events for example can be added to buttons via the button’s context menu. Fig. 2.10 illus- trates how the event “actionPerformed” is added to the conversion button by a simple mouse click. The event-handling code is automatically generated and can be modified by the developer. In this example, the code converts degrees Celsius to degrees Fahrenheit. Overall, the Java NetBeans IDE offers support to the UI developer in terms of pre-specified UI patterns, automatically generated code and a user-friendly way of changing properties of patterns without having to access the code. The auto- matically created UI pattern’s code cannot be changed in the source view, which [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 19 : (Jframe)- P1open1es lil> X ( P'ooertles I E\'ente coae O Properties ~ defaultCiose-Ope-ration fFXT - i)rJ n 0 <\F . )[~ Iitle Celsius Conver:er c~ S Olhc l Fn.ptrl'=~ 31VI3)1C0"1 To,: lEI c alwaysO'l To r:Supocrted ICJ baCiqrOU'lC D .:24U,:24U,:24U. c bound ~ <\lot Set> c curs or OP.f -'1111" .-, r o;.; r · IL enaljed m c ex.lcmJe\JSl::~le 0 c focueCycle~cot 111 c • title :j ;;v.:..ku;g.5tring) ttlc • Figure 2.8.: NetBeans IDE Property Editor lsi) Caleiuc: onverterGUI.jsva • a (ill: ~ SoJrce [ )esgn II ~~ l:!'i ~ ~ P li I <:-:> ~ .. Figure 2.9.: Simple UI Patterns in NetBeans IDE [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 20 Figure 2.10.: Registering Events in NetBeans IDE restricts the freedom of the UI developer. On a positive note, the IDE demands less programming knowledge and helps avoiding programming errors. The pat- terns however remain at the level of very simple, basic controls (equivalent to the lowest level of the UI component hierarchy in Fig. 2.4). More sophisticated, composed patterns are not available. Complex binding mechanisms, such as the binding of components to complex data sources, are missing. 2.2.3 UI Creation in Microsoft Visual Studio Microsoft Visual Studio 2008 provides a set of UI patterns of differing granu- larity. Fig. 2.11 displays common, quite simple controls such as labels, buttons, text fields and combo boxes which can be added to a form window via drag and drop. Similar to the Java NetBeans IDE, the property pane allows chang- ing characteristics of the controls, such as the text displayed by the control or its margins. The pattern comes with some predefined code which is automati- cally entered into the application as soon as the pattern has been dragged onto the form window. In contrast to the NetBeans IDE, the pattern’s code can be changed according to the developer’s intention. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 21 • rmmllmf.mt -roJl:r!rn'lfn'!lW!;t.tmi.J!D File Edit View Project Build Debug Data Tools Test Window Help • Debug • Any CPU • [!t custom< Too~box 13 All Windows Forms [\"!ointer ~x ~ BackgroundWorker fjji! BindingNavigator '1(} BindingSource @ Button buttonl ~ CheckBox [[d CheckedListBox Text Field !iJ ColorDialog ~ ComboBox L bf!J ContextMenuStrip ComboS ox r]il DataGridView ~ DataSet 'iii DateTime Picker ffiJ DirectoryEntry 1f9. DirectorySearcher Figure 2.11.: Simple Controls in Visual Studio Visual Studio however offers as well some more sophisticated UI patterns. Fig. 2.12 shows an example, the data grid view. It can be bound to a data source, whose contents will then be displayed in the rows of the table. Apart from the traditional Visual Studio Design View described above, newer Visual Studio releases such as Visual Studio 2013 offer the option to develop UIs in Expression Blend [69], a visual workspace for building or manipulating UIs. Blend provides a more extensive and sophisticated tool palette than Visual Studio, offering functionalities like the creation of animations, adding 3-D effects to controls and editing of HTML applications during runtime (see Fig. 2.14 and Fig. 2.15). Blend, furthermore supports the integration of Adobe artworks. Images can be turned into controls, and common Windows Presentation Foundation (WPF) con- trols such as buttons, scrollbars, menus can be graphically altered (see Fig. 2.16). Blend provides Windows Phone or Windows Store apps development support, as the app can be built from start to finish in the Blend Designer. Prototypes can be created in a tool called SketchFlow, and turned into a working app without requiring reimplementation. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 22 / rormJ.cs (Deslt;J~]''' ....Stsrt Pa.;e l Ob)3ct Brow>e' •X ...... • DataGrid'View Tasks 0:1 uu:::.~:: Cdld 5wr -'=l l DLLkiiiiJdft:ll. Wlldllt'f I I Figure 2.12.: Data Grid View in Visual Studio 2008 ~.. - .. _.. _ ··--··- .. _.. _.. _ .. _ ... _.. _ ,_ .. _.., [35 Apoa 2010 IT] Ii Mon Tue Wed Thu fri Sal Sun'~ ! ~9 ~ 01 1 2 3 4 ' 5 6 7 s 9 10 11 6 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 !im 29 30 I ' 3 4 5 6 7 8 9 0 Today: 28/04/2010 ···- ·- ···- ···-···-···- ···-o·····- ··-····- ···-···- ··- ··0 Figure 2.13.: Month Calendar Pattern in Visual Studio 2008 [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 23 Mo Tu We Th Fr ~ Su :6!7:829J03ll lallout • D so 7 8 ,. 12 ,. l$ 10' :7 :s" 19 !0" 21 22 l3 14 lS 16 l7 28 29 Tabltetn lO II 1 2 3 4 s Tabltero ~ L .-_~ .., 1 Exp:.nd.:r GroupBox 0 L~~~ 0 - lextBiod< Figure 2.14.: Examples of Controls and Shapes in Expression Blend [51] Overall, Blend offers features known from other graphic software such as Adobe Creative Suite, and emphasises the design aspect of UI creation, whereas Visual Studio provides a code-first approach to development, using the Design View to check if the code creates the intended UI. Developers can toggle back and forth between Visual Studio and Blend, enjoying Blend´sdesign tools and binding assistance, and Visual Studio´scode completion feature IntelliSense [64]. When it comes to UI patterns, Visual Studio and Expression Blend offer more sophisticated functionalities than the Java NetBeans IDE. The UI patterns used range from simple controls to more complex patterns such as the data grid view or the Month Calendar (see Fig. 2.12, Fig. 2.13). Furthermore, developers have the possibility to define and reuse their own UI patterns, so-called user-defined controls, which allows for patterns of high complexity. The predefined patterns in Visual Studio however belong to a rather simplistic form of UI patterns. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 24 Figure 2.15.: Blend for HTML [93] Figure 2.16.: Silverlight Custom Button in Expression Blend [116] [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 25 2.2.4 UIs at SAP Business ByDesign In the following sections, we discuss how UIs are created at SAP Business ByDe- sign, SAP’s solution for Small and Medium Enterprises (SME). We furthermore look at technologies used for adapting SAP Business ByDesign UIs to the vary- ing needs of different businesses. 2.2.4.1 UI Creation with the SAP UI Designer In the following, we introduce the “UI Designer”, an IDE created by the German software company SAP. The UI Designer is used to develop the SAP solution for SMEs, Business ByDesign, and is based on the (UI) pattern approach by [1] and [102] which is discussed in section 2.4. The UI Designer starts the UI Design process by choosing a generic layout, in the following called “floor plan”, such as a Business ByDesign work centre. The floor plan is then filled with reusable UI building blocks. In the following example, the UI developer chooses the building block “Object Work List” from the “Reusable Components” Menu (see Fig. 19) In a second step (see Fig. 2.18), the developer defines the data model of the application. He clicks on the data model tab located at the bottom of the UI De- signer, and selects a namespace from the drop down list. A Business Object (BO) is chosen by clicking the icon next to the list search for the BO. In this case, the developer searches for Products and selects the “ProductCategoryHierarchyCon- troller”. The UI Designer provides furthermore support for data binding. The devel- oper selects the DataList node and the BO Node to which the data list should be bound. Having selected both values, the button “Bind” is pressed to estab- lish the binding (see Fig. 2.17). Similarly, the DataField and the BO field under the node are selected to bind them. In the example in Fig. 2.19, data of type “LanguageCode” will be displayed in the field languageCode of the data list. A hierarchical extension is added to the data model in the third step (see Fig 2.20). To make the table hierarchical, the DataModel tab is selected. In the context menu of the Data List, first “Add Hierarchical Extension” and then the field ChildrenAssociation is chosen and bound to the corresponding node in the BO. The node should be the resultant node of the recursive association. Similarly, the floor plan can be filled with further UI components. Compared to MS Visual Studio and Net Beans IDE, a more advanced approach is visible. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 26 Figure 2.17.: Patterns in the SAP UI Designer Figure 2.18.: Defining the Data Model in the UI Designer [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 27 Figure 2.19.: Data Binding Figure 2.20.: Adding the Hierarchical Extension to the Data Model [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 28 The UI developer can benefit from complex, SAP specific UI patterns and bind- ing mechanisms. On the down-side, the UI developer is much more restricted in what she is allowed to do. The restrictive nature of the IDE however helps to assure a consistent look and feel of the Business ByDesign user interfaces, as developers are forced to follow certain guidelines. 2.2.4.2 Simplifying User Interfaces at SAP Business ByDesign Fig. 2.21 shows a sales order management UI in the SAP solution Business By- Design. The solution was designed as standard software for a large variety of companies and users, all having their individual needs and differing in their individual business processes. Figure 2.21.: Sales Order Management in SAP Business ByDesign- Minimum Layout Depending on the business process, only a small amount of the displayed fields might be used. Fig. 2.21 shows a user interface for sales order manage- ment in its minimum layout, displaying only one tab and the most important fields. SAP Business ByDesign offers the possibility to switch during runtime [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 29 from this minimum layout to a maximum layout displaying all possible fields by pressing the “view all” button. This layout contains all fields which are available in the SAP Business Suite, the SAP business software for large enterprises (see Fig. 2.22). Figure 2.22.: Sales Order Management in SAP Business ByDesign - Maximum Layout The user can furthermore easily hide fields which are not needed via the con- text menu or display additional ones (see Fig. 2.23). The pool of fields the user can choose from corresponds to the fields of the maximum layout. Business By- Design therefore offers a quite flexible UI. Figure 2.23.: Hiding Fields or displaying additional ones in SAP Business ByDesign [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 30 2.2.5 UI Development with Bootstrap Bootstrap [108] is an HTML, Cascading Style Sheets (CSS) and JavaScript (JS) framework for developing responsive, mobile first projects on the web. Once de- veloped by Mark Otto and Jacob Thornton at Twitter, Bootstrap was released as an open source product in August 2011 on GitHub. Otto and Thornton in- tended to develop a framework which encourages consistency across internal tools, given that the use of various libraries for interface development led to in- consistencies and high maintenance effort. In June 2014, Bootstrap became the most successful GitHub project with over 73000 stars and more than 27000 forks [122]. Since Bootstrap 3, Bootstrap follows a mobile-first approach, i.e., the frame- work consists of mobile-first styles throughout the entire library. The framework supports responsive web design, that is its CSS adjust to desktops, tablets and mobile phones, and automatically adapts pages to various screen sizes. Bootstrap supports the development of Websites with themes, templates for the website design. Bootstrap themes are offered online via various parties such as Wrap Bootstrap [58] (see examples of their commercially distributed themes in Fig. 2.24) and Bootswatch [81] (see some examples of their free themes in Fig. 2.25). Part of the themes are UI components such as the coloured labels in Fig. 2.26. Furthermore, Bootstrap provides several JavaScript components in the form of JQuery Plugins [122]. These deliver additional UI Components such as boxes, tooltips and carousels (see the “carousel” component in Fig. 2.27). In terms of reusable UI components, Bootstrap offers icons, dropdowns, navbars, breadcrumbs and alerts [114]. Customizable Bootstrap Components, LESS vari- ables and and jQuery plugins can be used to create customized themes and components. The components are added via simple script code which can be copied from the Bootstrap web site. A drag and drop functionality for adding components however is not provided. Bootstrap eases the life of the developers by supporting the adaptation of UIs to various platforms. The available Bootstrap themes are partially adapted to certain business scenarios (there are, e.g., themes for graphic design portfolios from Wrapbootstrap), however, the UI components offered remain on a general, non domain-specific level. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 31 :IEEH. --- - ·- - - -· $ 11 ~ 1053 $ tO '5'310 S10 '!1.882 Figure 2.24.: Commercial Bootstrap Themes available on WrapBootstrap ...... ,...... ,... Flatly Journal Darkly Flatly Joumal .'"' " ...... ' <1 -' ~ U/I,>o Figure 2.25.: Free Bootstrap Themes available on BootsWatch [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 32 Labels Default Primary Success Warning Danger «=IC3 fZEI!I IIaCQIB:::I Cllllllill:l3 lilCII Cll c:IIZJCE:I Figure 2.26.: Labels belonging to a Bootstrap Theme 2.2.6 UI Development with DukeScript carousel Figure 2.27.: Carousel UI Component in Bootstrap DukeScript is a set of Application Programming Interfaces (APIs) for creating cross-platform mobile and desktop and web applications [15]. It can be used to create applications in plain Java while rendering them internally with HTML5 and JavaScript technologies [39]. The business logic, written in Java and running in a Java Virtual Machine (JVM), can be clearly separated from the UI, which uses an HTML-renderer to be displayed. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 33 Applications in Dukescript can be developed in the following way [106]: When creating a new project, the type of project has to be chosen first. In the Netbeans project template tree, multiple prepared project versions are availble. In the ex- ample below (Fig. 2.28)., the most generic one, HTML 5 with Java Application Logic, is chosen. Figure 2.28.: Setting up a Project in DukeScript Having defined a description for the project, the location where the project is created needs to be specified. DukeScript allows to deploy a project to JavaFx, Android, iOS, various browsers (Chrome, Internet Explorer, Safari, Firefox) and NetBeans (see Fig. 2.29). Once generated, the program can be debugged by setting breakpoints, watch- points, stepping into or over lines of code, and inspecting the stack (see right bottom side in Fig. 2.30). The UI can be displayed by using an HTML Document Object Model (DOM) Browser (left bottom corner in Fig. 2.30), that allows for a preview of the resulting HTML page. From here, navigation to a CSS styles inspector and the source code is possible. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 34 Steps : IIQQt<"' FIQio:u• • Deploy as NetBeans Module' 2. rt•o r.nw, whPn )"0111 t~pplirt~tinn run'-. nn ;;lnKlo,t t~ny '-.igniti~;;nl 3. . OC\.1110r * rfPvir-F> on thP (11.-;tnPt, •\lht rtoo't ji!lll r=tr-k;;~p it;.<;. NF>tRP'tM 4 1 :-'1'1,-.l:lt~ ' • '"""IX module and deploy it to l.Sr·l -of Net8e3ns users via plug in •. ::.·~ ·o1d portal? OS '· 310:"1\<"'1:$ Mo:fif)" SHCME/ ·•llsat-:ings.:-cml to contain :Sefinition .:>f •• lh:lBt:olll~ :••o . 5umrr.:'Y net.beans,Jnsta•'•'&!Ofl pr:>pert:,•: OFno; hlP NRfw ... r runfiiP? 1 1<- .e.d' tn Figure 2.29.: Deploying the Project for NetBeans Having finalised the code, the developer can package the application to one of the target platforms via the Custom submenu (see Fig. 2.31). Like Bootstrap, DukeScript eases the deployment of applications to different platforms, and thereby the adaptation of UIs to different devices. In terms of UI reuse, the UI components offered remain on a basic, non-domain specific level. 2.2.7 UI Development – Discussion As shown in the previous sections, UI development faces challenges in terms of the adaptation of UIs to various types of context such as business scenarios and devices. Modern IDEs provide support to the UI developer, often by offering UI components, which range from very basic components to much more com- plex components. Reuse of UI components however is not a first class concept, it serves rather as an addition to the functionality of the IDE. UI development needs to be supported by IDEs that offer more and also more sophisticated UI [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.2 ui development 35 Figure 2.30.: “Hello World” Program for HTML and Java NetBeans components and thereby foster UI reuse. The presented IDEs furthermore provide no guidance to the user. In order to create a user interface, the UI developer has to have knowlegde about the ele- ments that belong to the UI. Some of the IDEs shown allow the developer to create the UI by dragging and dropping UI components onto a canvas. However, there is no mechanism which creates the UI for the developer or suggests it to her according to the business scenario chosen. There is a need for IDEs to pro- vide more guidance to the UI developer and offer more automisation of the UI development process. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.3 codereuseandcodesearch 36 Figure 2.31.: Choosing the Target Platform 2.3 code reuse and code search In the following section, we review different approaches in research related to code reuse and code search. This involves the investigation of code search en- gines, research approaches for code reuse and Question & Answer sites. 2.3.1 Code Reuse Code Reuse is the use of existing software or software knowledge to produce new software [30]. In order to discover and retrieve open source code for reuse, a number of code search engines are available, including Google Code Search [35], Krugle [36], Open HUB [22] and byteMyCode [10]. Apart from these search engines, the following work in research has investi- gated the topic of code reuse: [67] presents the source code search engine Ex- emplar, which is making use of textual descriptions of applications, API-calls, [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.3 codereuseandcodesearch 37 and the data flow among API calls to detect relevant software in large applica- tion archives. The search results based on natural-language queries are ranked according to these three criteria. [66] offer a unified approach for searching for code, selecting components and synthesising them into software projects. Their work is based on the assumption that developers have an interest in how software is interconnected, and therefore analyse the code for API-calls. APIs are seen as strong indicators of the function- ality the code provides. In difference to its predecessor code search engine Exem- plar [67], this approach investigates the code itself, and not its documentation. The search engine Portfolio locates the code based on a search query, analyzes how it is used and displays this information to the developer. Like our work, [66] and [67] aim at improving the productivity of programming by identifying and reusing existing code. However, the focus of both works lies purely on the functionality of the code, not on its representation on a user interface. Our ap- proach takes into account that depending on the context, the same functionality might have to be presented by highly differing UIs. Code search based on semantics is discussed in [87]. In difference to [67] and [66], the search for code is not based on keywords only. In addition, [87] takes method signatures or classes, test cases, contracts and security constraints into account. The derived source code is changed by multiple transformations in or- der to meet the requirements of the user. The strength of this work is that the user can specify in a very detailed way what she is searching for. At the same time however, the specification requires development knowledge and a clear un- derstanding of the future solution, otherwise signatures and class names cannot be used as search criteria. The search in our scenario is based on dimensions of context (business scenarios and device characteristics), that do not presuppose development knowledge. [16] provides an approach for semi-automated reuse of small-scale source code, such as the reuse of individual methods and classes. Making use of se- mantical and syntactical information, the approach assists the developer with the tedious task of integrating small-scale source code into the target system, al- lowing the developer to focus on the most difficult tasks during the integration. The approach identifies correspondences between target code and reuse code via generalisation, evaluates the quality of the candidates for code reuse, and transforms the piece of code of the highest quality in a way that it can be inte- grated into the target code. Our work does not tackle the issue of integration, as we make use of UI elements that can operate independently from each other. In difference to [16], we concentrate on the user interface, not on its functionality. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.3 codereuseandcodesearch 38 Like in [87], the work of [57] bases the search for reusable code on test cases. However, [57] is exclusively relying on test cases, other search criteria like key- words are not taken into account. Test cases are used to identify code relevant for reuse and, at the same time, to test their functionality and suitability for the code. The code can automatically be prepared for the integration by slicing the code, and can be weaved into the code for testing and unweaved again. The work however, like all other work analyzed in this section, does not consider the reuse of UI. Table 2.1 lists different approaches for code reuse, the criteria used for code search and specific characteristics of the approaches. Approach Type Search based Specific Characteris- on tics Google Code search engine keywords, [35] project label (e.g., Java, Rails, AJAX) Krugle [36] search engine keywords results can be filtered by programming lan- guages, projects and authors Open HUB search engine keywords results can be filtered [22] by definitions (class, constructor, etc.), pro- gramming languages, projects, file exten- sions byteMyCode search engine keywords, tags tag cloud identifies [10] topics with most code snippets [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.3 codereuseandcodesearch 39 Approach Type Search based Specific Characteris- on tics Exemplar search engine searches doc- ranking of search re- [67] umentation sults based on application descriptions, API-calls, data flow among API calls Portfolio [66] search engine searches code based on key- words Semantics- search engine keywords, source code is trans- based Code method signa- formed according to Search[87] tures, classes, user requirements test cases, con- tracts, security constraints Small-scale tool assists NA assist with integra- Source Code with semi- tion of reuse code Reuse [16] automated based on semantical reuse of small- and syntactical infor- scale source mation code Code Genie search engine test cases preparation for code [57] integration by slicing Table 2.1.: Comparison of Code Reuse Approaches 2.3.2 Question & Answer Sites Code reuse is also fostered by Question & Answer (Q&A) Sites such as • Stack Overflow [27] • Experts Exchange [24] [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.3 codereuseandcodesearch 40 • Stack Exchange [26] Stack Overflow is a privately held website which was created by Jeff Atwood and Joel Spolsky in 2008 [127]. The site features questions and answers on a large va- riety of topics in computer programming [18]. As a variation to traditional Q&A sites and forums, users can earn reputation points and badges, and questions and answers can be voted up and down [78]. Accordingly, a sort of gamification of the web site is visible [127]. With over 2.7 Mio registered users and more than 7.1 Mio questions in April 2014 [77, 79], the site proves to be highly popular. Experts Exchange, founded in 1996, is a member-based Question and Answer site for users in IT-related professions. Points are awarded for answering ques- tions or writing articles that are categorised as useful by the community [123]. While Stack Overflow’s main field of attention is programming, Experts Ex- change offers a wider field of technology-related topics including Operating Systems, Hardware, and Security. In difference to Stack Overflow, which allows for collaborative editing of answers, answers in Experts Exchange cannot be changed. The web sites use slightly different mechanisms for identifying the best answer. On Experts Exchange, the user who asked the question is asked to choose the most complete solution. On Stack Overflow, the best answer is iden- tified by community votes [68]. In September 2009, Jeff Atwood and Joel Spolsky founded Stack Exchange, a network of Question and Answer sites. The sites were modelled on Stack Over- flow, and hold questions and answers on diverse topics in fields like Technology, Culture / Recreation, Life / Arts, Science, Business and Professional [126]. In the technology space, we can find sites on e.g., Sharepoint, Salesforce, Game De- velopment, Tex / Latex, Code Review and User Experience [25]. All sites mentioned enable developers to find and reuse code snippets or ex- plore guidelines on how to implement a certain functionality. Stack Exchange’s User Experience site also allows searching for guidelines on how to design UIs. However, none of the sites investigated offer UI components or complete UIs for reuse. 2.3.3 Code Reuse and Code Search – Discussion As the analysis in the previous paragraphs has shown, there are various ap- proaches such as code search engines, work in research and Question and An- [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 41 swer web sites that assist with finding and reusing code. All approaches in- vestigated focus on the functionality of the code, not on the user interface it- self. They allow searches for e.g., API-calls, textual descriptions of applications, method names and signatures. However, they do not enable the search for UI functionality and terminology, or the search for widgets, grids, tables, buttons, etc. Accordingly, the reuse of UIs and UI components is not supported. Given the UI-intensive application development of today, there is a need for more UI reuse. 2.4 ui patterns This section addresses the nature and use of user interface patterns. After giv- ing a general definition of UI Patterns, describing their common elements and showing their advantages, the usage of UI patterns during the process of user interface creation is illustrated. 2.4.1 Defining UI Patterns Patterns offer solutions for common design problems related to a certain context [131]. They describe best practices within a given design domain, which might be user interfaces, Web sites or object-oriented programs, or even buildings [103]. Patterns not only contain a detailed description of the problem, but also its solu- tion, together with a manual on how to apply it [12]. Interlinking patterns of a certain domain will find its expression in a pattern language. Originally, the concept of patterns was developed throughout the 1960s and 70s in order to ease architectural decisions. Based on contemplations about the har- mony and attractiveness of medieval cities, the architect Christopher Alexander and his colleagues identified architectural patterns, displayed as sets of design rules [102], which helped to improve the quality of life ([1],[8]). The transfer of this approach into the world of software came with several user interface patterns presented by Kent Beck and Ward Cunningham in 1987 at the Object-Oriented Programming, Systems, Languages & Applications (OOP- SLA) conference. The “Gang of Four”, as Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides are often referred to, published their award-winning book “Design Patterns” in 1994 (with a copy-right of 1995,[32]), thereby paving the way for a wide-spread acceptance of the software patterns approach. After [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 42 exploring the strengths and weaknesses of object-oriented programming, the au- thors described twenty-three classic software design patterns; the names of these are well-known and widely used within the software development community [12]. In our work, we focus on user interface patterns, common solutions for typical design problems in the user interface domain. They became visible with Jennifer Tidwell’s paper “Common Ground” [102]. The earliest adoption of the topic can however be found in “User Centered System Design” of Norman and Draper [75]. UI related patterns are today presented in UI pattern libraries and collec- tions, such as [109], [105] and [55], or in UI pattern languages like in [7]. 2.4.2 Elements of Interaction Design Patterns Although UI patterns vary significantly in the way they are described in UI pattern libraries, common elements can be identified. [99] lists up the following elements in his research: • Pattern Name. Finding an adequate and descriptive pattern name plays an important role in the process of UI pattern creation. It enables a clear communication about design issues. • Pattern Description. Describing a pattern in a clear and understandable way is essential for a good pattern design. Screen shots and graphics can help to make the pattern characteristics more tangible. • Context of Use. The context of use section helps designers to decide if a pattern would be appropriate for a certain solution. This section might have to be updated frequently, as new user requirements might be discovered and new applications be developed during the life-cycle of a pattern. • Where Used. This section describes in which production systems a pattern is actually used. Like the “Context of Use”, this section requires frequent updating. • How it works. The mechanics of a UI pattern are specified in the “how it works” description. The descriptions can be supported by videos or screen shots. • Specifications. Specifications inform the designer about everything he has to add to the design, such as line widths, colours, text sizes. The specifi- [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 43 cation can be illustrated with a screen shot of the pattern and describing call-outs. • Co-requisites. Co-requisites are patterns which have to be implemented along with a chosen UI pattern. For a login component pattern, this could be patterns for changing passwords or recovering lost passwords. • Related Patterns. Patterns which are similar to the UI pattern in question, that is, patterns which aim at the same goals, but are used in a different context, are named in this section. • Competitive Approaches. Patterns solving similar problems, but having been invented by other parties, are presented and discussed in the para- graph “Competitive Approaches”. • History. The “History” logs all important data related to the evolution of a pattern. Who was the creator, which changes has it undergone and for what reasons? This section provides the designer with rationales for the features of a pattern. • Source Code. For architectures with a sufficiently modular structure, the source code can be given along with the pattern description. This can sim- plify the implementation of a pattern significantly. • Usability Results and User Feedback. Feedback provided by users about the pattern in usability tests, along with feedback from institutions like customer support, sales or other sources are collected in this section. • Discussion. The essence of discussions tackling the design and usage of patterns is attached to the pattern description. 2.4.3 Reasons for using Patterns What are the reasons for using interaction design patterns? [102] identifies the following benefits: • Patterns serve as a means of communication, they support a common un- derstanding of design problems and thereby ease discussions amongst de- signers, also coming from different disciplines, and between designers and software users. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 44 • As patterns capture the collective wisdom of designers, they provide guid- ance and best-practices for less experienced software designers. • They increase the efficiency of UI design and development by offering so- lutions for common UI problems. Ideally, the patterns provide coding for design invariants and can be individually adapted to specific contexts. Ex- isting patterns might as well be reused for new user interface concepts such as 3D interfaces and virtual reality, without the necessity of reinventing the wheel. • Patterns provide a level of abstraction which helps to identify which qual- ities make a user interface successful, independent of fashions or economic circumstances. • The exchange of knowledge with other disciplines is simplified. Patterns might be likewise applicable in fields like book design, consumer electron- ics or the design of control panels (e.g., in cars and airplanes) and in user interface design. Lessons could be learned from other areas and be applied to UIs. 2.4.4 UI Pattern Examples The following two examples of UI patterns shall illustrate the nature of UI pat- terns. tag cloud. The UI pattern “tag cloud” (Fig. 2.32, described in [109]) ad- dresses the issue that users would like to easily discover which tags on a website are most often used and are the most popular. The pattern solves this problem by listing out the most common tags in an alphabetical order and by changing the font size and the weight according to the popularity of the tag. The pattern can be used on news sites, photo galleries and stores which allow tagging. Accord- ing to [109], the relative popularity of a tag can be easily understood through the visual display. Another advantage of the pattern is that it reflects user activities rather than the intentions of a site designer. calendar picker. The “calendar picker” pattern in Fig. 2.33 [105] can be applied whenever a date or date range shall be entered in order to submit, sort or filter data. The pattern consists of a box with a one-month calendar overlaying the application whenever activated. The user can select a calendar date from the [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 45 All time most popular lags 07 afrk.a amst~fd Figure 2.32.: Tag Cloud (www.flickr.com), as shown on [109] box. Alternatively, a three-month calendar may be shown. It is recommended not to use the calendar picker when the date could be entered quicker or more easily via a text field, for example when birthdays have to be selected (a birthday 30 or 70 years back would require extensive clicking through the calendar boxes). Furthermore, it shouldn’t be offered as the only possible way of entering the date, as the user might be more familiar with alternative ways. 0 search·-- photos Photos • Venice """* .. flollftCIQ!tWMWII'i'!N.,.. fill"'~ lfl!lltt~""""''ss:::;;-=.,,.,=,-=="'"' .-..&JIOfrtt .-..1:~ Qn)(llY(~ DaUill.~n &11~ ~1 4<1ll2!:09 I Q, April20t9 Nay 20)9 June ~09 ~.k:lrl rlii'IIMU.. fll s.! SV'I•l~WMTI'IIl Fn SM. &.r!Uotlu•WIICTN. '*' ~ ' , l .. . , ~61liiOU 34SIIlt 7Stf011ftt:t IZ '' t 4 1~ It 11 1t Ill 11 ·~ U 1' n 1$ 14 1:) U 11 l O II ~ 1tl02122 ~~ 24 U 1111U 2021~2:l Z1222l1A2!2527 0 2tt7 2:1 1t)O ..l42Sltl1D2t3C ll2t~ Figure 2.33.: Calendar Picker Pattern [105] 2.4.5 Parties contributing to UI Patterns In essence, different parties can be involved in the creation of UI patterns. In [12], design patterns for ubiquitous computing are initially developed by researchers, [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 46 and later on evaluated by researchers and designers. User studies were inte- grated into the creation of user interface design patterns of [54]. At the German software company SAP, a department called Solution Management evaluates the needs and requirements of the software users. The User Experience Group and UI designers works on the creation of guidelines and UI patterns. 2.4.6 The Pattern Approach at SAP SAP defines user interface patterns analogous to patterns in architecture: “A user interface pattern is an archetypical or generic design solution to an interaction problem in the context of a user task” [115]. In the following sections, we look at the type of patterns used at SAP, and at the relationship of UI patterns and tasks in the SAP approach. 2.4.6.1 Types of Patterns UI Patterns at SAP are organised in a hierarchy of patterns with different granu- larity (see Fig. 2.34), ranging from simple controls and to relatively sophisticated, composed patterns. The meaning and usage of the different UI pattern types will be illustrated in the following section. Figure 2.34.: Hierarchy of UI Patterns at SAP Business ByDesign [118] [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 47 simple controls. On the lowest level of the pyramid, very simple UI con- trols like labels, text fields, dropdown lists and buttons reside as visible in Fig. 2.35. The yellow box displayed in the figure contains a number of these simple controls labeled by their name. Figure 2.35.: Controls constituting Building Block Elements [118] building block elements. They are combined to the next level of UI pat- terns, the UI building block elements. In this example, the simple controls con- stitute the building block element “Search Pane” (see Fig. 2.36). The graphic furthermore displays the building block elements “Toolbar with Actions”, “List Pane” and a pattern displaying “Detailed Information for an Object”, which are all composed of simple controls. the building block. Combining the named building block elements leads to a new pattern, the building block, such as the “Object Worklist” in Fig. 2.37. The nature of the building block elements and building blocks is SAP-specific, [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 48 Figure 2.36.: Building Block Elements [118] that is these UI patterns had been created specifically for SAP Business ByDesign Applications. the floor plan. On the highest level of the UI pattern pyramid is the floor plan. The floor plan is not composed of building block elements or building blocks, but rather provides an overall structure where these patterns can be in- tegrated into, like a sort of scaffolding. The floor plan which was chosen by the UI designer in Fig. 2.37 is of type “work centre”. The pattern itself is displayed in Fig. 2.39, the floor plan filled with the building blocks “Portal Header”, “Con- textual Navigation” and “Object Work List” results in the user interface shown in Fig. 2.37. Floor plans have been created for the specific requirements of SAP Business By Design. The following section explains the floor plan UI Pattern in more detail. The user interface floor plan can be seen analogous to the ground plan of a building: There are different types of ground plans, such as ground plans for [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 49 Figure 2.37.: Workcentre Floorplan with Building Blocks [118] family houses, office buildings, student apartments, etc. Their basic structure is defined by a corridor with doors to different rooms. Likewise, different types of typical layouts - the “floor plans” - can be identified for SAP Business ByDesign. The floor plan represents the overall layout of the UI. Different types of SAP floor plan patterns are available. Fig. 2.39 and Fig. 2.40 show examples of the floor plans “Work Centre” and “Guided Activity” at SAP Business ByDesign. The Floor plan “Work Centre” (displayed in Fig. 2.38 and Fig. 2.39 ) determines a structure with a search functionality in the header and “Favorites”, “Personalise” and “Help” menus. This basic structure can be filled with more fine-grained UI Patterns, the building blocks, building block elements and simple controls presented in sec- tion 2.4.6. They fill the room in-between, on the ground plan, they would corre- spond to the kitchen, the living room, the bedroom. In the SAP approach, object work lists or the contextual navigation panes (see 2.38) are examples of this kind [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 50 Figure 2.38.: Floor Plans in SAP UI Design [118] Figure 2.39.: Work Centre Pattern in SAP Business ByDesign (Extract) [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 51 Figure 2.40.: Guided Activity Pattern in SAP Business ByDesign (Extract) of patterns. The reason behind this structure is the possibility to reuse building blocks and building block elements in different floor plans [91]. 2.4.6.2 The relationship between SAP Patterns and Tasks In order to more clearly understand further characteristics of the SAP approach, we will first introduce the term “task” in this section. Fig. 2.41 describes the relationship between tasks and composite tasks and their corresponding UI patterns in the SAP approach. The lowest level shows atomic tasks like pressing a button or entering text. These very elementary tasks corre- spond to simple UI controls like buttons or text fields. Tasks like searching for data are represented by pattern elements, which might be compound controls comprehending a filter row, a data row and a paging row. Tasks can be combined to composite tasks such as data inspection. The UI pattern for inspecting data could consist of a search area, several functions, and a list displaying the search results. This level of composite tasks is what SAP’s UI pattern approach focuses on. SAP furthermore clearly separates this kind of UI patterns from the overall layout, the [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 52 “floor plan”. Activities like “Inspection” correspond to Application Floorplans. There are, e.g., separate floorplans for accounting and personnel administration. On the highest level of the task hierarchy, the workflow is represented by por- tal floorplans or navigation, a sequence of UIs corresponding to the different business process steps to be performed for fulfilling a task like “preparing a customer visit”. Figure 2.41.: The UI Pattern Concept at SAP [4] The SAP pattern approach is characterized by two special features. Firstly, in order to increase the flexibility of the patterns, the description of a task a user has to perform is separated from the representation on the user interface (Arend 2004). The advantage of this separation is that the user interface components can be structured according to characteristics of the device, such as a large Personal Computer (PC) monitor vs. a small Personal Digital Assistant (PDA) screen, or according to a prevailing design paradigm. Furthermore, the approach targets user interface solutions for generally applicable tasks – so-called generic tasks – only. The goal of the approach is to identify such components which can be used for a large number of applications such as the inspection of objects, which can be likewise sales orders, invoices, customers or opportunities. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.4 ui patterns 53 2.4.7 UI Patterns and their Usage in UI development The relevance of UI patterns and reuse for UI development has been recognised by major software companies such as SAP and IBM. Online communities like [131] and [105] serve as platforms for exchanging UI elements, patterns and widgets. Some of the approaches such as [72] offer anti-patterns. These are pat- terns which show bad UI design that should be avoided. In the following, table 2.2 summarises how patterns are used at major software companies (IBM, SAP) and in community approaches. Many of the communities had been founded by representatives of User Experience (UX) and interaction de- sign industry, such as Peter Morville, founder of a UX consulting firm, Diana Frurip, interactive designer, or Will Simmons, freelance digital and UX designer. As shown in the overview (Tab. 2.2) , the patterns can be classified by the plat- forms they had been designed for (e.g., web, desktop, mobile) and the pattern type, such as design pattern, e-commerce pattern, interaction design pattern. Web Site Pattern Type Platforms Commu- nity IBM design web no SAP BusinessByDesign design web no Yahoo [74] design web yes UI Patterns [105] web web yes Designing Social Inter- social inter- web yes faces [11] faces Interface Design Patterns interface de- smartphone, yes [76] sign MDA/PDA, Laptop/PC, Settop-Box Android Patterns [19] Android Android yes Mobile Patterns [95] mobile iPhone, An- no droid Inspired UI [80] mobile iPhone, An- no droid Lovely UI [31] mobile iPhone, iPad, yes Android [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 54 Web Site Pattern Type Platforms Commu- nity Mobile Design Pattern mobile iOS, Android no Gallery [71] and more Pttrns [6] mobile iPhone, iPad, no iOS Pattern Library for Interac- interaction web yes tion Design [110] design Quince [46] UI all no Table 2.2.: UI Pattern Approaches and Communities 2.4.8 UI Patterns – Discussion The reflection on UI Pattern has shown that the need for global solutions for com- mon UI design problems was recognised several decades ago. Major software companies like IBM and SAP make use of UI patterns in their approaches, and online communities offer and exchange UI patterns. Accordingly, the concept of UI reuse has already been introduced into software development. However, in difference to the previously discussed UI components, UI patterns are merely guidelines that offer reusable design solutions for specific problems [17]. They don’t offer UI knowledge in a form that benefits the user without UI develop- ment knowledge, but require experienced UI developers that can interpret the pattern and implement it. In order to increase the productivity of UI develop- ment and make UI development accessible to non-expert users, apart from UI patterns UI components, reusable, design-specific chunks of a UI, are needed. 2.5 ui and context The following section reflects on the challenges faced by UI developers having to adapt UIs to various forms of context. First we present a number of real-life examples for changing context and its influence on UIs. Then we discuss work in research which tries to adapt user interfaces to various dimensions of context [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 55 such as different development platforms, user characteristics or environmental factors. 2.5.1 Examples of Context requiring UI Adaptation As stated in previous sections, the UI development process can be very time consuming and tedious, not only during the initial creation of a UI, but also during the adaptation of UIs to context such as varying business scenarios and platforms. Possible reasons for the necessity to adapt UIs to changing context are: • Deviation from Standard Solutions. The adaption of the UI may be nec- essary because the business process of a specific company differs from the standard process offered by the software solution. Business processes are often historically grown and reflect the specific culture within the com- pany. Unique bonus systems for sales representatives for example or spe- cific functionalities handed down from legacy systems may lead to changes of the underlying logic and as well of the UI. • Differing User Preferences. UIs may need to be changed according to dif- fering user preferences. The sequence in which different fields, forms or tabs appear on the screen may be suitable for one company, but may not reflect the needs of another one. • Adaptation to Corporate Identities. The adaptation of UIs may be neces- sary in order to meet requirements of different corporate identities and corporate designs. Corporate designs may differ between corporations or even within the same company. The Australian bank SunCorp has about 40 subsidiaries (like AAMI, LJHooker), which share the same software sys- tems. To the public, they appear like independent companies, presenting the same underlying software with different layouts. • Globalisation. Globalisation implies adaptation of the UI to the legal re- quirements and business process variants in different countries. The tax system of the United States differs to a high extent from the one used in France. All tax-related functionalities like pricing or invoicing require ad- justments on the UI. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 56 • Changing Business Contexts. Changing business contexts may imply the need for user interface variations within the same business process. The call center application at an insurance company requires huge amounts of data to be entered during the process of claims management. In a catas- trophic scenario caused by a flood, bush fire or heavy storm, several thou- sand claims per day may have to be handled. In order to guarantee a quick claims management process to its customers, the insurance company may prefer to enter the most relevant data only, at least for insurants which are classified as reliable and which do not represent a threat to the insurance by fraud. Depending on the estimated reliability of the customer, the appli- cation may automatically change from a full layout to a minimum layout with essential fields for quick data entry. • Adaptation of User Interfaces to varying Platforms Fig. 2.42 shows a stan- dard sales order example in SAP CRM 4.0. The screen contains a large number of different tabs, fields and functionalities. The application was de- signed for a large variety of users, their differing business processes and needs. Figure 2.42.: Standard Sales Order in SAP CRM 4.0, Transaction CRMD_ORDER On mobile devices, the application has to be boiled down to the most im- portant fields due to the limitations implied by screen size and hardware. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 57 The comparison of the screens displayed in Fig. 2.42 and Fig. 2.43 (show- ing the SAP solution Mobile Sales for Handheld 5.0) illustrates significant differences in terms of screen size. Figure 2.43.: Mobile Sales for Handheld 5.0 The difficulty here is to determine which fields and data will enter the mobile world. The necessary restriction to certain data can never meet the requirements of all customers. Corporations which would like to display data differing from the standard solution often have to deviate completely from the standard solution. Enormous development efforts can be the out- come. None of the IDEs presented in section 2.2 provides a satisfying answer to the issues stated above. They support the development process by offering UI components ranging from simple to very sophisticated ones, and by automizing and simplyfying typical development tasks. However, the easy adaptation to different corporate identities for example is not given. An IDE diminishing the [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 58 effort needed for the adaption of screens to different platforms and business scenarios would be of interest. 2.5.2 GUI Development and Context-Awareness Various attempts to integrate UIs and context-awareness have been made in dif- ferent research projects. The approaches are differing in terms of which type of context is taken into account and which devices they refer to. Context-awareness for mobile UIs during runtime is realised in [9], and during design time in [61]. In [9], user interfaces of mobile devices are automatically adapted to user context-changes, as well as to different screen resolutions or ori- entations. UIs adapt to specified user contexts by the use of style sheets. [61] generates UI containers for mobile devices and adapts UIs to platform specific characteristics and user tasks making use of heuristics. [56]’s work aims at providing native user interfaces to mobile devices based on the context of the user, whereas the context-awareness in this work is not task- driven like in [133] or [61], but refers to environmental factors and user data. An approach not restricted to mobile devices called “CRUISe” [86] aims at the dynamic composition of user interfaces via web services. The work differs from the other proposals presented insofar as it not making use of annotations like [47] , and is not based on predefined structures or preindexed documents, but is encapsulating generic, reusable web UI components as so-called User Interface Services. All approaches named rely on hard-coded rules development and do not sup- port incremental UI reuse rules capture. There are assumptions made about what users prefer, and all knowledge about the system behaviour has to be captured before the implementation. Our approach provides more flexibility, as user in- terfaces can be adjusted to varying needs and preferences, and rules can be extended or changed accordingly. Heuristics are introduced in [96] in order to ease UI customisation tasks during the development phase. The work furthermore uses a knowledge base which stores the users’ preferences in order to adjust UIs to users’ needs during run- time. A solution which is even more user-oriented than the work of [9] or [61] results. This approach however does not take platform characteristics into con- sideration. Knowledge-based systems are enhanced with machine learning algorithms in [50] and [40] in order to adapt user interfaces to context. [50] intends to cre- [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 59 ate self-optimising UIs for mobile phones. Based on contextual factors like time, location, and last action performed predictions for the priority order of applica- tions are derived, and the machine learning proposes the predicted application to the mobile user to enable faster navigation. However, this approach does offer solutions for adapting the application UIs themselves to different contexts, as they remain static. [40] adapts user interfaces to tasks and context. The context considered in this work comprises platform, user (such as user profile, level of knowledge) and en- vironmental (noise level, luminosity) factors. Users’ tasks point to related busi- ness components. Task-driven UI adaptation can be realised together with chang- ing the UI according to different user contexts. In contrast to our approach, the association between context and UI patterns is however fixed, there is no way to change relationships between entities during run time. [134]’s objective is to improve the usability of e-Commerce applications. This is achieved by reducing user interfaces to the UI components actually needed to fulfil the users’ tasks. The focus lying on the adaptation to users’ tasks, the ap- proach resembles [61], but refers to e-Commerce desktop applications instead of mobile scenarios. The main weakness of this approach is that process variations, such as adding products several times instead of only once, are not considered. Such variations are covered by our approach by the possibility to increase the number of line items and by adding, replacing or deleting UI components. Another way of adapting UIs to context offer cross-platform GUI toolkits [124]. GUIs implemented with these packages are platform-independent, and can be ported to mulitple platforms without changing its source code. Table 2.3 shows a comparison of current cross-platform toolkits. Some of these approaches pro- vide adaptations to various devices, but remain on a basic to generic composite UI component level. In table 2.3, we have classified the complexity of the UI components provided by these toolkits in accordance with the hierarchy of UI components given in Fig. 2.4. Similar classes are included in modern cross-browser/device GUI frameworks such as the HTML5 Mobile Development Frameworks described in [92]. A com- parison of such frameworks can be found in table 2.4. The named frameworks provide development support for HTML5 / Javascript applications on mobile phones, tablets, desktops and Televisions (TVs). Although multiple platforms and devices are supported by these frameworks, guidance in terms of what UI elements correspond to a certain scenario is not provided. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 60 Framework Standard Platform complexity of UI components CEGUI C/C++ Windows, Mac, basic Linux FLTK C/C++ X11, Windows, Mac basic GTK+ C/C++, Perl, X11, Windows, Di- generic compos- Python rectFB, Quartz on ite Mac OS X IUP C/C++ Windows, X11 generic compos- ite JUCE C/C++ Windows, X11, Mac generic compos- ite Qt C/C++ Windows, Linux, OS- generic compos- X, iOS, Android ite Java/Swing Java Windows, OS/2,X11, generic compos- OpenLook, Mac ite Pharo Smalltalk Windows, X11, Mac generic compos- ite Mono/GTK# C# Windows, Mac, generic compos- Linux ite Table 2.3.: Comparison of cross-Platform GUI Toolkits Framework Standard Apps Platform Mobello HTML5, mobile web, any platform JavaScript smart phone, support- tablet ing HTML5, JavaScript DHTMLX JavaScript mobile web iOS, Android Touch The-M-Project HTML5, tablet, mobile, iOS, Android, JavaScript Kindle Kindle Fire, Blackberry, Surface [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.5 ui and context 61 Framework Standard Apps Platform Lungo HTML5, mobile, desk- iOS, Android JavaScript, top, TV CSS3 Lavaca HTML, mobile iOS, Android JavaScript, CSS Jo JavaScript mobile, desk- iOS, Black- top, Dashboard berry, Android, widgets WebOS Sproutcore HTML5, web, mobile iOS, Blackberry, JavaScript Android Sencha Touch HTML5 mobile iOS, Black- berry, Android, Kindle Fire Table 2.4.: Comparison of HTML5 Mobile Development Frameworks 2.5.3 UI and Context – Discussion Research offers several valuable and interesting approaches in terms of adapting UIs to various dimensions of context such as different devices, environmental factors and user characteristics. The majority of these approaches often remain at the level of changing screen colours or eliminating screen elements, but they don’t consider changing the whole structure and content of the UI. This how- ever is necessary when adapting UIs to various business scenarios, or adapting complex UIs to different devices. During our analysis, we also encountered ap- proaches that are able to fundamentally change the structure and content of a UI depending on the context, e.g., by (re)combining widgets. The weakness of those approaches is that they work according to a fixed set of rules, and make assumptions on what is correct UI for a certain context. An approach with more flexible rules is needed. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.6 background and related work - discussion 62 2.6 background and related work - discussion Table 2.5 compares the work discussed in this chapter in terms of the following aspects: Do these approaches focus on the reuse of functionality, e.g., by search- ing for code needed to fulfill specific tasks as in [134]? Do they aim at the reuse of UI components as [41] ? Are UIs / applications adapted to certain context, ei- ther during run time or design time, as in [9]? Have the approaches been applied to web services such as in [42]? Related Work Reuse Reuse Context Focus of Func- of UI Aware- on Web tional- ness Ser- ity vices McMillan Exemplar Code Y N N N Search [67] McMillan Searching Source Y N N N Code [65] Reiss Semantics Based Code Y N N N Search [88] Cottrell Small Scale Code Y N N N Reuse [16] Henninger Component Y N N N Repositories [41] Lemos CodeGenie [57] Y N N N Vassilakis E-government Y Y N Y Services [111] Feldmann Annotated Web Y Y N Y Services [29] Izquierdo Annotation Tool Y Y N Y UI Services [47] Spillner Dynvoker [97] Y Y N Y Paulheim Ontology Modu- Y Y N Y larisation of UI [82] Paulheim UI Component In- Y Y N Y tegration [83] [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.6 background and related work - discussion 63 Related Work Reuse Reuse Context Focus of Func- of UI Aware- on Web tional- ness Ser- ity vices Hoyer FAST [42] Y Y N Y Butter Context-aware UI N Y Y N Mobile [9] Ruiz UI Containers for Mo- N Y Y N bile Devices [61] Lange Dynamic Service Inte- Y Y Y Y gration [56] Zhang Pattern UI Genera- N Y Y N tion [133] Pietschmann CRUISe [86] Y Y Y Y Feng Heuristic UI Design N Y Y N [96] Kamisaka Operation Predic- N Y Y N tion [50] Hariri Business Adaptation N Y Y N [40] Zou ECommerce Apps Busi- Y Y Y N ness Processes [134] Table 2.5.: Comparison of Related Work The comparison reveals that the approaches in section 2.3.1 focus purely on the reuse of functionality, but do not take the reuse of UI, context-awareness or web services into account. The reuse of UI and a focus on services is part of the work in section 2.1.5. Section 2.5.2 contains approaches for which context- awareness and UI reuse form an important aspect. Our approach provides the reuse of functionality in cases where the UI compo- nents are bound to web services. However, this is not a prerequisite, the focus lies clearly on the reuse of UI. The approach adapts UIs to context during design time, thereby the topic of context-awareness plays an important role. The sample implementation later on discussed in this work is making use of web services, showing that the approach can be applied to SOA environments. [ Context-aware UI Component Reuse for Web Service Development Environments ] 2.6 background and related work - discussion 64 The modern application development process is supported by various APIs and API platforms, IDEs, Mashup tools, tools for code search and code reuse. Signif- icant improvements have been achieved on the functional side. UI development however hasn’t seen the same major improvements yet. In the web service space, various APIs and API platforms support the develop- ment process. However, there is a focus on the functionality of the code. The same level of support could not be detected for the development of user inter- faces. Modern IDEs support the application development process to various degrees, from very simple IDEs like Java NetBeans, to more complex IDEs like Visual Studio or the SAP UI Designer. UI Components are offered by several of the investigated IDEs, but often remain on a basic, non-domain specific level. No guidance is provided to the developer in terms of which UI components belong to a certain UI. The investigation of code reuse approaches showed that there is a focus on the reuse of functionality, but not on the reuse of UI. Given the UI-intensive devel- opment of modern applications, the same amount of attention is required on the UI side as on the code side. Through UI patterns, the concept of UI reuse had already been introduced to UI development. In contrast to UI components, which provide reusable chunks of UI code, UI patterns are merely guidelines that require to be interpreted by an experienced UI developer. An approach which enables UI reuse for non-expert users is needed. Various approaches and APIs like Bootstrap assist with adapting UIs to con- text, such as differing platforms, environmental factors and user characteristics. Most of these approaches however lack the ability to perform complex structural changes to the UI, as it can be necessary when adapting UIs to business scenarios. The approaches that are capable of major UI adapations often operate according ot a fixed set of rules and make assumptions on what components belong to a UI. There is no mechanism for changing rules if needed or the incremental build of a rules knowledge base. A need for an approach that supports UI development in SOA environments, fos- ters the productivity of UI development by reuse and assists with the adaptation of UIs to context is clearly visible. [ Context-aware UI Component Reuse for Web Service Development Environments ] 3 UIDEVELOPMENTKNOWLEDGE,CONCEPTSAND REPRESENTATION As discussed in the previous chapter, modern IDEs and UI development ap- proaches in research lack in support and guidance for the UI developer. The goal of this work is to provide more UI development support and guidance by automatically suggesting UIs. UI knowledge such as UIs and rules shall be stored in a Knowledge Base (KB) and made available for reuse. In order to at- tain this, a representation for UI artefacts is required. We show in the following sections how UI artefacts are represented in this work. 3.1 representing ui components The core idea of our approach is to support UI developers in their daily tasks by suggesting user interface components to them during the development process. These components can be of different levels of granularity, ranging from simple textboxes with labels to entire user interfaces (see also Fig. 2.4 and the UI com- ponents shown in the Appendix ChapterA). The decision to use UI components was made when we initially investigated 45 versions of sales order screens in the SAP CRM system. The analysis showed that all screens could be composed of only nine different UI components. These components were variants of the components sales order header, sales order date section and sales order item section. The UI suggestions are based on context selected by the developer. Our approach derives suggestions for user interfaces from UIs created for similar contexts in the past. The suggested user interfaces consist of a number of UI widgets. These widgets might come with a specific service and mapping already linked to them. Where no service / mapping link is provided, the developer needs to discover a suitable service and link it with the UI components, which can be done by using traditional techniques. The UI developer can modify the UI proposals according to her needs, or reject the proposal and create a new UI from scratch. The changes / new UI will be made available to other UI developers on its completion. 65 [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 66 UI components, context and recommendations are stored in a rule-based KB in our approach. Updates to the KB are triggered by any change in context or UI. The KB structure consists of artefact types and relationships linking them, as shown in the entity-relationship diagram, Fig. 3.1. The main artefacts are Rules (for UI recommendations). The rules consist of conditions (when does the rule apply) and conclusions (what should be recommended when the rule applies). Forms the condi on Forms the conclusion Rule 1..n 1..n Recommen- Context dation Is combined with 1 1 Layout Is part of Is combined 1 1 Business with Theme 1 Is part of Scenario Is combined 1 with 1 1 Binding Device 1 contains 1 Component Composition 1..n 1 Figure 3.1.: ER-Model of Rule Components 3.2 representing ui recommendation rules UI recommendations in our approach are given based on rules. Rules lead to a conclusion based on one or multiple conditions. The nature of both rule condi- tions and conclusions is discussed below. [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 67 3.2.1 Rule Conditions The left hand side of Fig. 3.1 shows artefacts which make up rule conditions. Devices (different consumption platforms, e.g., Blackberry, iPhone, Windows Desktop, etc.) and Business Scenarios (e.g., Sales Order Management, Quotation Management, Campaign Management for Business Customers, etc.) describe our Context 1. Sections 5.4.1 and 5.4.2 describe in detail how the context in this work was derived. These artefacts form the vocabulary used in the condition of a rule, e.g.: If device=“Apple iPhone” and screen resolution = 800x600(+/-20%) and scenario=“Sales Order Management-Standard Sales Order”, then... 3.2.2 Rule Conclusions The conclusion of a rule is a UI recommendation for a given context. User inter- face suggestions in our approach are composed of UI Components (see section 3.1). In order to capture relevant aspects of UI components in a generic way, we represent them through four basic dimensions (see right-hand side of Fig. 3.1). We will illustrate these concepts by artefacts found in development frameworks such as Microsoft Visual Studio or Apple’s Cocoa. These dimensions are: • Composition specifies which UI components are combined to form the structure of a UI (component). For instance, a screen for the scenario Sales Order Management - Standard Sales Order might be composed of the UI com- ponents Sales Order Header V1, Sales Order Date Section V3 and Sales Order Item List V1. There are basic UI components in each framework. The compo- sition structure forms a tree with basic UI components as leaves, and the UI itself being the root. As an example, in the Visual Studio .NET Model View Controller (MVC) framework, we can find concepts similar to our Compo- sition when making use of views. Partial views (ascx.files)- representing UI components - are combined in complete views (aspx.files) to form a UI (see 3.2). • Layout describes how the components are arranged on the screen, see Fig. 3.3. We distinguish horizontal layout, where components are placed 1 In this work, we have restricted our approach to two dimensions of context. The context could however be easily extended by other dimensions such as corporate identity or development platforms. [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 68 UI Element Header Final UI UI Element Date Section UI Element Item Section Figure 3.2.: Composition of UIs by combining UI elements next to each other, and vertical layout, where components are positioned above and beneath each other. Vertical and horizontal layouts can be nested within the Composition, thereby allowing to model arbitrary combinations of horizontally and vertically ordered components. Layouts can be used to adapt a UI to different devices – e.g., a collapsible vertical layout may be suitable for mobile devices with small screen sizes, whereas a horizontal layout may be more suitable for wider desktop screens. The layout can be represented in ASP .NET as a view, at which partial views are displayed during runtime in a certain manner, e.g., horizontally next to each other. • Theme refers to style sheets, which define the look-and-feel of UIs. Style sheets are a common method to adapt UIs to the look-and-feel of different operating systems (Windows, iOS, etc.) and to different corporate designs (e.g., Coca Cola vs. IBM). This is achieved by varying attributes like font size and style, colour scheme (e.g., red and black for Westpac, yellow and [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 69 Ht ..,., Oate~ction ..m s 0 H"do< I S..~· V.JJ J - U.dar OGM AddNewltem o'l No V~j Saesc·::errli> sv~-~" 1 Optn C "'Actua l dates ""'"' Rnl Sj~.t'HS ,CI .\b Open 0 Co not ... iJse'!SialJS Do not print: Sok110 S Elllll Sh)ll 0.110 11<1kl C:rlor.l'!ro:r Efrl*;-e Jell::r>be Ell f!t-'ell!>:e -·1 RE-l'fendl:e 0 o.t.Seetlon 0 ""'' Horizontal Vertical Figure 3.3.: Examples for different Layouts black for Commonwealth, blue and grey hues for Windows), background images, and even scripts. Stylesheets can be overlayed with other technolo- gies like JQuery and JQuery Mobile to give screens an iOS-like appearance. Figure 3.4 illustrates how the same content looks when represented with style sheets for Westpac and Commonwealth Bank. In Visual Studio and other frameworks, themes are represented by CSS files. • Binding links a UI to back-end web services, and describes how data should be transformed and exchanged. One UI might be used for different purposes, like accessing different back-end services, even without chang- ing the UI itself. The flexible binding mechanism allows for changing the functionality in the background without changing the UI as such. An ex- ample is the creation of user interfaces for creating a sales order vs. UIs for changing a sales order. The UI may remain the same, whereas the web service the data is submitted to may change (for instance, from SalesOr- derERPCreateRequestConfirmation_In_V2 to SalesOrderERPUpdateRequest - Confirmation_In, see Fig. 3.5). The concept of Binding accordingly indicates which web service the UI element is bound to. The ASP .NET framework uses service references to make web service parameters available in the [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 70 ~ ~-;;;;::;;;-~~ Q <;;,yoo• • Y ( :• llor,1•1tyou E-.:ti,Jiuki"N.'1 IU<.:lll.bnud l. Pm·tncrs ffiY OII~UUI'SUVIngs"? lew the su'llf Wc knu\\how. long t•un. aiii:D CIIID ------*'-·~ · vI Per.,onal ~>olulion.,, Husines., ~>olutioM. Planmng f ort:>morrow ~M nagirlg m'J business ;, "",; - u .., t;~, ,.,..,...... ,. , ~~· ; :'~ ''"• . '!;;;;,\ · ~ J ... ~ tu.. . Personotl pruduc.:ls. Busint>Ss prudu~:ls. > ~ o ...... p.~...... ' "-""' ~~ Motle O Online Banking– CW Bank Online Banking - Westpac Figure 3.4.: Stylesheets for different Banks framework. By writing a controller with getter and setter methods, UI fields in the view can be populated with data. e Hlldlf e HotKif ... s..osoo. ... --5Y!almSJ•1JS c;~SU1.15 0 0 ,..,_ ...... - thtt" ::Ji.U) ...... - Sodo liDI s..o liDI """ liDI ..... liDI ... """ ... """ """""""' .N """""""' "" Em! Em! -._.-..., -._._,'""""""' """"""""" """""""" 0 D•S.tton 0 D•S.ttM 0 tuu 0 """ Sa/esOrderERPCreateRequestConfirmation Sa/esOrderERPUpdateRequestConfirm ln_V2 ation_ln Figure 3.5.: Sales Order UI bound to different Web Services 3.2.3 Data Structures for Rules Fig. 3.6 shows a concrete example of how context is represented on the database level. [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 71 SizeX NULL 80 NULL 200 RuleID 82 133 Resolution Y NULL 240 NULL 1024 Value Mobile 139 Resolution X NULL 320 NULL 768 Condition Condition Brand NULL RIM NULL Apple Attribute Device_Title Scenario ID 86 93 Device Device Title Mobile BlackBerry 8310 Tablet iPad ID - Device - Source NULL wurfl://blackberry8 310_ver1 NULL wurfl://apple_ipad _ver1 ID - Description NULL NULL NULL Parent NULL 33 1 36 ID 1 8 36 45 Title Sales Standard From Value Rel. Cont Replenishment Order Business Scenario Scenario Business esentation of UI “Create Standard Sales Order Mobile” on the Database Level - Parent ID 1 85 85 3 . 6 .: Repr ID 85 139 140 DeviceID 1 1 Figure Case Case Scenario ID 85 139 ID 86 121 [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 72 The context consists of a business scenario, e.g., scenario no. 85 (sales order) and a device, e.g., no.1, a generic mobile device. In the business scenario table, the hierarchical structure of scenarios becomes visible: Scenarios Rel. From Value Cont and Replenishment Order are subscenarios of the scenario with parent-id 85, Sales Order Management. The same structure can be seen in the device table, where e.g., the device mobile tablet is a sub-scenario of mobile. Each combination of business scenario and device is stored in the case table. Each dimension of context can enter as a condition for a rule, e.g., “IF device-title = Mobile, THEN apply rule 82”, or “IF scenario-id = 139 (Sales Order - Rel.From Value Cont), THEN apply rule 133”. Fig. 3.7 displays the representation of a user interface in the database. [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.2 representing ui recommendation rules 73 Posi on 0 1 2 ID 72 Component ID Composition NULL Composition-Order Composi onID ID 76 72 77 72 78 1 72 2 3 Style Script Theme Composi onID Mobile Mobile Title ID 6 ThemeID 5 6 72 NULL NULL NULL NULL NULL NULL NULL NULL NULL BindingID Ac onName Controller Name Component Controller Name NULL NULL ViewName HeaderList SalesOrder DateSec on SalesOrder ItemList SalesOrder Icon Layout_colla psible.png esentation of UI “Create Standard Sales Order Mobile” on the Database Level Binding NULL NULL NULL 7 LayoutID 3 . 7 .: Repr ViewName CollapsibleLay out Layout Title Create Sales Order SalesOrder Create Figure ID 5 Title Collapsible Ver cal Layout Sales Order Header Sales Order Date Sec on Complete Sales Order Item List Create Standard SO Mobile Name 2 3 49 1 ID ID 7 [ Context-aware UI Component Reuse for Web Service Development Environments ] 3.3 ui development knowledge, concepts and representation - discussion 74 The component table contains UI components of different granularity. The entire User Interface Create Standard Sales Order Mobile is saved in the compo- nent table under id 49 and consists of the components Sales Order Header, Sales Order Date Section Complete and Sales Order Item List. The components are rep- resented each by a View and a Controller. UI number 49 is associated with the four dimensions Layout (Collapsible Vertical Layout), Binding (Create Sales Order), Theme (Mobile) and Composition (72). The Composition describes via the arte- fact Containment that the UI consists of the three named UI components, which are placed at positions 0,1 and 2, i.e., component Sales Order Header is placed at the top of the screen, component Sales Order Date Section Complete underneath it and the Sales Order Item List component occupies the bottom section. 3.3 ui development knowledge, concepts and representation - discussion In this work, UIs are suggested to UI developers making use of rules. Context such as Devices and Business Scenarios act as a rule condition, the suggested UI is the rule conclusion. UI Components and Composition (defines which UI compo- nents belong to a specific UI), Layout (specifies how UI components are arranged on the screen, e.g., a vertical vs. a horizontal layout), Theme (defines the look and feel via a style sheet), Binding (the binding of a UI component to a web service) form the suggested UI. The rules data structure in our approach reflects the hierarchical nature of busi- ness scenarios and devices in the context. [ Context-aware UI Component Reuse for Web Service Development Environments ] 4 UIKNOWLEDGEACQUISITION A central part of our approach is the reuse of UI artefacts. This reuse is enabled by a rule-based recommender system, which suggests user interfaces depending on the current context, as specified by the developer. The suggested UIs stem from previous development efforts. Chapter 3 discussed how UI artefacts and rules are represented in our work. This chapter shows how UI artefacts can be suggested to the UI developer with the help of the recommender system. The high-level architecture of the proposed recommender system is shown in Fig. 4.1. Parts and aspects of its usage are explained in this section, starting with the information used by the recommender system. Followed by how reuse rules are structured, how they are entered into the system, and how they evolve over time. Hardware Software Users Community Producers UI Developers Domain Experts Context UI Rules SO Mgmt., UIs Context iPhone 4 Component Platform Descriptions Composition Business Scenario Layout Descriptions Binding Theme Recommender System Figure 4.1.: Proposed Architecture of the Recommender System 75 [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.1 context and ui repository in the ui recommender system 76 4.1 context and ui repository in the ui recommender system The heart of the recommender system is a knowledge base which stores both contextual data, rules and UI-related data. The nature of context and UI data is explained in this section, Section 4.3 explains rules in more detail. The recommender system stores Context data for platforms and business sce- narios. The Platform Descriptions database (see Fig. 4.1) contains data about the characteristics of different platforms, such as brand, model, screen sizes, key- board type, etc. The platform-related characteristics are stored using a hierarchi- cal structure, from more generic characteristics such as “Mobile” vs. “Desktop” to more specific ones such as “Apple iPhone 6” vs. “Apple iPhone 5s”. An ex- ample for such a device hierarchy is illustrated in Fig. 4.2. Devices Mobile Desktop Multitouch PDA Handset Tablet Blackberry WIN WebOs Symbian Mobile Brand: RIM BlackBerry 9530 Size: 50x66mm Resolution: 360x480px Pointing method: touchscreen Keyboard type: qwerty Figure 4.2.: Example of a Device Hierarchy Likewise, business scenarios are stored in a hierarchical structure in the Busi- ness Scenario Descriptions database. An example for such a business scenario [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.2 investigation of sap crm user interfaces 77 hierarchy is “Sales Order Management” ⇒ “Quotation” ⇒ “Web Auction Quo- tation”. The UI repository stores different types of UI components, as outlined in Sec- tion 3: • UI Components of different granularity, including – basic UI components such as text fields, labels, sliders – more complex generic composite UI components such as calendar pickers – composite UI components which are specific to a certain domain, such as a sales order management UIs or purchase order lists (examples for these types of UI components are visible in Fig. 2.4) • Themes in the form of style sheets • Layout information as views (e.g., a view representing a horizontal layout loops over an array of UI components and places them in a horizontal manner on the screen), and • Composition, which combines UI Components to form a UI • Binding, which links a UI component to a web service Contextual knowledge can stem from different parties such as hardware and software producers, UI developers, domain experts or internet communities 2 . How these data sources are used in rules is explained in Section 4.3; how the UI knowledge is acquired follows in Section 4.4. 4.2 investigation of sap crm user interfaces In the search for a way to create user interfaces more efficiently, existing real- life UIs were investigated. Could we detect common, rather coarse-grained UI components which would enable us to recreate the UIs faster than by developing them from scratch? Part of the analysis was the decomposition of the UIs into such common UI components. For the investigation, 115 screens from an SAP CRM 7.0 System were used that belong to the traditional SAP GUI. First, 61 UIs of the Sales Order Management 2 in our approach, we are making use of device characteristics stored in the WURFL [59] database, see Section 5.2. [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.2 investigation of sap crm user interfaces 78 Scenario were compared in order to detect common UI components. As a result, each Sales Order UI was decomposed into 3 UI elements. In order to recreate 61 UIs, we needed 9 different sales order headers, 4 different date sections (some of the UIs required no date section at all), and only 2 different item sections. As an example, Fig. 4.3 shows Sales Order Management screen Quotation, which was dissected into 3 UI Elements Sales Header 4 (see Fig. 4.4), Sales Date Section 2 (Fig. 4.5) and Sales Item List 1 (Fig. 4.6). Figure 4.3.: Sales Order UI Quotation Figure 4.4.: UI Component Sales Header 4 Figure 4.5.: UI Component Sales Date Section 2 [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.2 investigation of sap crm user interfaces 79 Figure 4.6.: UI Component Sales Item List 1 UI Component Sales Header 4 (Fig. 4.4) could furthermore be found on nu- merous of the other UI screens1 investigated, e.g.: • Debit Memo Request • Quotation • Replenishment Order • Standard Order • Sales: Leased Object The Replenishment Order screen shares the same header element and item list element with the Quotation, however, as can be seen in Fig. 4.7, it uses another date section (see Sales Date Section 2 in Fig. 4.8). Sales Date Section 2 could be detected on many other screens, such as • CD Quotation • LJ Quotation • SUS Confirmation • SUS Order In this manner, we compared all 115 SAP CRM UIs to each other, classified by business scenarios “Sales Order Management”, “Service Order Management” and “Contract Management”. AppendixA presents further examples of the SAP CRM UIs explored and the UI Elements derived. We analysed 30 Service Order Screens, which were split into 7 UI elements each, amongst which were 5 different header elements, 7 business partner ele- ments, 1 iBase section, 4 date sections, 5 priority sections, 3 problem sections and 4 item list elements. For further information on the UIs and the elements, refer to AppendixA. 1 For a full list of all UIs sharing this header element, please refer to SectionA. 1.2 in the Appendix. [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.3 rule specification 80 Figure 4.7.: Replenishment Order UI Figure 4.8.: UI Component Sales Date Section 1 In Contract Management, our analysis discovered 7 different header elements, 4 date sections and 2 item list elements on overall 16 Contract Management UIs. Examples of Contract Management UIs and UI Elements detected can be found in SectionsA. 1.5 andA. 1.6 in the appendix. Overall, we investigated 115 SAP CRM UIs of medium to high complexity, which could be dissected into 57 coarse-grained UI components. The fact that a lot of common UI elements could be detected shows a potential for the reuse of UI components. 4.3 rule specification A key point of the approach is the use of knowledge acquisition method Ripple Down Rules (RDR)[89] which has been successfully applied to other domains such as pathology reports, soccer simulations, duplicate invoices, but never be- fore to the domain of user interface creation. RDR were developed in reply to the [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.3 rule specification 81 Rule 0: Rule 3: Rule 1: IF Business Scenario = “not defined IFBusiness Scenario = Sales Order IF Business Scenario = Sales Order “AND Management , Telesales AND Management AND Device = Mobile, except Device= “not defined”, Device = Mobile, PDA AND Pointing THEN Layout = 2 (Vertical), Binding = 45 THEN Layout = 2 (Vertical),Binding= 0 Method= Touch screen, (SalesOrderCreate), Composition = 67, (“”) Composition = 1, Theme = 455 THEN Composition = 68, Theme = 457 Theme = 455 (GeneralMobile) (GeneralMobile) (MobilePDA) If not Rule 2: Rule 5: IF Business Scenario = Sales Order IFBusiness Scenario = Sales Order Management AND Device = Desktop, except Management , Telesales AND THEN Layout = 1 (Horizontal), Binding = Device = Desktop, Mac AND 45 (SalesOrderCreate), Composition = Resolution=1440x900, 67, Theme = 434 (GeneralDesktop) THEN Theme = 435 (DesktopMac) Figure 4.9.: Rules in our Approach, featuring four Dimensions in the Conclusion challenge of maintaining medium to large rule-based knowledge systems [89]. In the RDR framework, expert knowledge is acquired based on the current context and added incrementally [128]. We have decided to adopt this approach as it (i) provides a simple and easy approach to knowledge acquisition and mainte- nance [14]; (ii) allows for the incremental creation of new rules while processing example cases. For the specifications of rules, we make use of a Single Classification Ripple- Down Rules (SCRDR) approach which provides exactly one conclusion per con- text. This is combined with an approval process as used in Collaborative Ripple- Down Rules (CRDR)[89], and the possibility to actually change rule conclusions (in traditional RDR approaches, only exceptions to rules are allowed, rules can never be changed or deleted). A Rule in our approach specifies which UI components should be combined to form a screen for a given context. Each rule specifies a condition (the context), for which a conclusion (a partial UI suggestion) is derived. In our approach, rules are described in the following way. Conditions are based on two attributes, the business scenario (Sales Order Management, Supply Chain Management, etc.) and the platform (Desktop, Mobile, PDA, iPhone, etc.). The conclusion relates to a subset of the four dimensions described above: Layout, Submission, Composi- tion and Theme. The combination of the conclusions of the most applicable rules for all four dimensions results in the suggested user interface. Fig. 4.9 depicts a number of rules, some with partial conclusions, in the knowl- edge base. Rule 0 contains the default conclusion where the business scenario and the platform chosen are not defined. In our prototype, we do not suggest a specific UI for that case, but propose an empty UI screen with some default layout and theme. The knowledge base shows true (except) branches, which are [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.4 incremental ui knowledge acquisition 82 accessed in case the if-condition is fullfilled, and false (if not) branches, which are accessed otherwise, that is in case the if-condition is not fulfilled. Starting at the top node, the inference engine tests whether the next rule node is true or false. If a rule node is true, the engine proceeds with the child nodes of this rule node and tests if the children are false or true. The last rule node that evaluates to true is the conclusion given. This is done for each dimension individually. The overall conclusion is then the combination of all partial conclusions. To give an example in Fig. 4.9, a UI developer wants to create a UI for the con- text “Business Scenario = Sales Order Management , Telesales AND Device = Mobile, PDA AND Pointing Method= Touch screen”. The system finds a UI that was created for the context “Business Scenario = Sales Order Management AND Device = Mobile” (Rule 1). The developer modifies the UI suggested by Rule 1 by applying a new style sheet for PDAs (affects the theme) and adding further UI components (affects the composition). An exception to rule 1 is created which results in rule 3. In a second scenario, the developer wants to create a UI for the context “Business Scenario = Sales Order Management AND Device = Desktop”. Rule 1 is checked and evaluates to “false”. The system starts to check the rules down the “if not” path. Rule 2 evaluates to true, and the UI with the dimensions “Layout = 1 (Horizontal), Binding = 45 (SalesOrderCreate), Composition = 67, Theme = 434 (GeneralDesktop)” is suggested to the user. 4.4 incremental ui knowledge acquisition In our approach, knowledge is added to the KB in the following situations: (a) A new UI is created from scratch, for a given context. (b) The recommder system suggests a UI for a given context, and the developer decides to modify it. (c) A UI is created / changed based on a new context. Case (a) triggers the creation of a new rule for a context that was already stored in the database, but for which no associated UI existed. The KB is extended with a new component entry, and, if new layouts, themes, or new web service bindings are used, these are stored in the respective databases. In case (b), the rule condition remains unchanged, but the conclusion changes. In our approach, such changes are not stored automatically: if an existing rule is modified, it is unclear if this change will improve the KB content. Therefore, [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.5 confidence score 83 an approval process is triggered, where a suitable approver (e.g., development manager) has to confirm or reject the change. Case (c) relates to a completely new context. Here, the condition and (likely) the conclusion of a rule are affected. This case arises whenever new devices are introduced to the platform database, new business scenarios are added, or com- binations of devices and business scenarios are chosen for which no knowledge exists (a new case is created and accordingly a new condition and rule is spec- ified). If the new context is an extension to an existing context, an exception to a rule is stored. Otherwise, a new rule is stored in the if not branch of the rule tree. After saving the UI in case (c), a difference list is presented to the user for every dimension of the UI, e.g., the UI developer is asked why the layout was changed, why the composition was changed, and a list of context-related differences is presented to her. The developer can flag the differences which were relevant for her decision to change the suggested UI. Relevant for a change in the layout might be , e.g., that the UI was created for a PDA as opposed to a generic mobile device. The context specified as relevant by the user will be saved by the system as a new rule condition. Our approach thus requires little user effort for maintaining the knowledge: Apart from specifying the rule conditions in a difference list, the user is not required to actively contribute to the rule base evolution – rules are created and stored by the system based on the users’ actions. 4.5 confidence score For each UI suggestion, a value for the confidence is calculated. The confidence value serves as an indicator of how well the UI suggestion found by the system suits the context given. It is calculated as soon as the user has selected the context in the wizard, and is displayed together with the UI suggestion created by the approach. A confidence value of 100% indicates that a UI has been built in the past for exactly the same context. Confidence values lower than 100% show that a UI for a similar context has been found in the system. The higher the confidence value, the more similar is the context chosen to the context of the former case. Accordingly, the more suitable the UI suggestion might be for the new context chosen. In this work, the confidence serves merely as an indicator for the UI developer. In future validations of our approach however, the confidence score could be used to evaluate the fit of our UI suggestions to the context. [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.6 evolution of rules 84 The confidence is first calculated separately for the four dimensions submis- sion, layout, theme and composition. The overall confidence is the average confi- dence value over the four dimensions. The confidence is calculated in the follow- ing way: let case i be the case entered by the UI developer (called the Induction Case), and case j be the case stored in the system which is most similar to i (called the CornerStoneCase) , then X(i, j) represents the number of attributes which are equal between the cases i and j. Y(i,j) indicates the number of attributes that are defined in both cases, but differ between cases i and j. Z(i,j) is the number of attributes which are defined in one case, but do not exist in the other. Weighting Y(i,j) and Z(i,j) equally, confidence C(i,j) is then calculated for each dimension in the following way: M(i, j) := X(i, j) + Y(i, j) + Z(i, j) (4.1) X(i, j) C(i, j) := (4.2) M(i, j) For instance, we have entered the case Sales Order Management, Telesales and Mobile, PDA, Blackberry, Blackberry 98420 and have found the case Service Order Management, Standard Service Order, Mobile, PDA. In this case, the dif- ference list shows two device related attributes which are equal (Mobile, PDA ⇔ Mobile, PDA), i.e., X(i, j) is 2; two business-scenario related attributes which are different (Sales Order Management, Telesales ⇔ Service Order Management, Standard Service Order), i.e., Y(i,j) is 2; and two attributes which are defined in the induction case, but not in the cornerstone case (Blackberry, Blackberrry 98420). Accordingly, Z(i,j) is 2, and M(i, j) is 2+2+2 = 6. The system calculates a confidence of 2/6= 0.33, that is a confidence value of 33 %. 4.6 evolution of rules Rules evolve over time: with every new change made to suggested UIs, with every new UI created from scratch and every new combination of context and UIs. We are using the following algorithm for creating and changing rules (here in Pseudocode): Case CornerstoneCase ( return Case for applicableRule ) [ Context-aware UI Component Reuse for Web Service Development Environments ] 4.7 ui knowledge acquisition - discussion 85 The case entered into the system, consisting of an Action, a business scenario and a device is the InductCase. The cornerstone case, that is the most similar case to the InductCase, is derived as case for the applicable rule: To derive the applicable rule and thereby the cornerstone case, we are using an SCRDR algorithm. The applicable rule is the deepest rule in a decision tree which evaluates to true for a given case. The exception rule refers to exceptions to an existing rule (case evaluates to true), the false rule refers to the false (if not) branches in the knowledge base. 4.7 ui knowledge acquisition - discussion The reuse of UI artefacts being one of the central elements of our approach, we use a recommender system which suggests UIs to the developer based on a given context. The context consists of two dimensions, devices and business scenarios, which are stored in a hierarchical structure. This enables the creation of rules and suggestion of UIs on each level of the context-hierarchy. During our analysis of user interfaces, we investigated 115 SAP CRM UIs of medium to high complexity, which could be dissected into 57 coarse-grained UI components. The fact that a lot of common UI components could be detected on these real-life UIs showed the potential for the reuse of components, and thereby for an increase in UI development productivity. The recommender system is based on an incremental KB, which stores the con- text, UIs and rules. Rules are created automatically by the system based on the creation of new UIs and changes to existing UIs. The RDR approach, formerly applied to all kind of domains such as pathology reports and soccer simulations, was chosen to support the incremental knowledge acquisition based on context. In the recommender system, the confidence score serves as a measure for the suitability of suggested UIs for the given context. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5 SYSTEMARCHITECTURE,IMPLEMENTATION& KNOWLEDGEBASECONTENT The previous chapters illustrated how UI artefacts are represented in our ap- proach, and how the recommender system, which is based on a knowledge base and the RDR approach, can forster the reuse of UIs. To enable the evaluation of the approach, which is discussed in the next chapter, we (i) developed two proof-of-concept prototypes, and (ii) filled the KBs with realistic content. Before presenting the details of the prototypes, called UISE and WST, we discuss the different possibilities to structure the KB. 5.1 deciding on a knowledge base rule paradigm Having decided to use RDR for the reasons explained in Section 4.3, we had to investigate which type of RDR would be adequate for our approach. First we had to decide if we were facing a single or multiple classification problem. The cre- ation of user interfaces is a complex task that may lead to multiple conclusions, particularly when several parties are contributing to a user interface design. In a community approach, user interface designers might contribute different pro- posals for a user interface for a chosen business scenario. The proposals might reflect the corporate identity of different companies, different ways to realise usability or simply reflect the personal taste of the UI designers. A Multiple Classification Ripple-Down Rules (MCRDR) approach, which allows for multiple conclusions, might be adequate for this scenario. On the other hand, multiple conclusions might lead to a chaotic conglomeration of differing user interfaces. The decision on which UI proposal is the right one for a certain context has to be made by the UI designer. Without clear UI guide- lines and multiple UI developers contributing to a solution, the outcome can be applications lacking a consistent look and feel, with UIs differing significantly from each other. Furthermore, as the preview of every single UI proposal has to be calculated during runtime, the use of MCRDR for this approach might have a negative effect on the runtime performance of the system. In regards to a con- sistent look and feel of UIs and runtime performance, a SCRDR approach might 86 [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.2 prototypical implementation of uise 87 be the better choice. As both approaches are valid, we decided to develop two implementations, one based on single conclusions, the other delivering multiple conclusions. In the first prototype, UISE, we implemented an SCRDR approach which provides ex- actly one conclusion per context. This was combined with an approval process as used in CRDR [5], and the possibility to actually change rule conclusions (in traditional RDR approaches, only exceptions to rules are allowed, rules can never be changed or deleted). In the second prototype, WST [38], multiple widgets are suggested to the user for a given context. The main results described in [38] are summarized here for completeness. In the following, we describe the implementation of both prototypes that were built as a proof-of-concept of our approach, starting with UISE. 5.2 prototypical implementation of uise The UISE prototype instantiates the approach for a Visual Studio .Net MVC environment. User interfaces are rendered with the help of JavaScript and the libraries JQuery and JQuery Mobile. These technologies were chosen as they sup- port the adaptation of UIs to a large number of different platforms. The proto- type is implemented as a rich Web application, using JSON as a data-interchange format. To fill the context side of the KB, we first integrated the Wurfl database [59] into our approach. Wurfl contains detailed technical descriptions of many de- vices and is updated on a regular basis. Second, we fed the KB with sample business scenarios derived from the SAP Business Suite CRM System via reverse- engineering. The details of the content elicitation are discussed in Section 5.4. The following components form the architecture: • A front-end, the UISE wizard, which guides the UI developer through the application and which helps the user to enter the context and to define which conditions are going to enter a rule • A back-end,which derives the UI proposals, calculates rules, and commu- nicates with the database and the frontend • A database for persisting new rules, business scenarios, platforms, cases, and UI components [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.2 prototypical implementation of uise 88 • Web services which the UI components are bound to. The APIs of our approach are shown in the following. We distinguish between a Reuse-API, which corresponds to the Recommender System and which pro- vides everything needed for proposing a UI, and a Build-API, by which the knowledge base is built. The Reuse-API is described in table 5.1. The Build-API is presented in table 5.2. Table 5.1.: Reuse-API Operation Name Input Output UI id View(component) UI FormCollection View(component) Component id View(component) CreateScenario FormCollection JSON (scenario.id), Scenario RenderComponent Component PartialView(view, component) or Par- tialView(“Elementary”, component) Editor - View (model) Table 5.2.: Build-API Operation Name Input Output RippleDown FormCollection JSON (difference list, applicable rules, confidence) Save FormCollection JSON (difference list, applicable rules, pendingForApproval ) The prototype’s functionality is split into two main procedures: recommend- ing UIs and acquiring knowledge. The recommendation works as follows. On the start of the prototype, the wiz- ard guides the user through the application (see Figure 5.1 and Figure 5.2 ). The wizard displays all available devices and business scenarios which are derived from the device and business scenario repository. The context is entered into the wizard. On the server, RDR is triggered and a conclusion for the dimensions Lay- out, Binding, Composition and Theme are derived. A new user interface is created out of the named conclusions. The system checks if this user interface already [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.2 prototypical implementation of uise 89 Figure 5.1.: Choosing the Device in UISE exists in the component repository. If so, the name and description of the exist- ing component is derived from the database. The component is rendered to an HTML string. A value for the confidence, that is the suitability of the suggested UI for the given context, is calculated. The system determines the differences be- tween the case which was entered into the system and the case which was found in the knowledge base. Components, HTML string, differences and applicable rules for all four dimensions and the confidence value are sent back to the client as a JSON response. The recommendation starts with the user specifying the current context in a wizard. Using the hierarchies for the two context dimensions, the user selects from all available devices and business scenarios present in the repository. This is done with a set of dropdown boxes (see Figure 5.1) . The selected context information is sent back to the recommender system. As shown in Fig. 4.1, the system matches the context with the conditions of the available rules, selects the [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.2 prototypical implementation of uise 90 Context Selection UI Suggestion Client Derive rules Send Server derive data context Rule Composition Engine Platform Layout UI Descriptions Binding Business Scenario Descriptions Theme Rules Figure 5.2.: Architecture of the Recommender System best fit, and returns a UI suggestion. Technically, the UI suggestion is stored and transmitted as a HTML string. If needed, the UI developer refines the suggested UI, deletes and adds ele- ments, and possibly changes the Theme, Layout, or Binding. Figure 5.3 shows an example of a suggested Sales Order UI in the UISE prototype. Additional UI components can be dragged and dropped from the left hand side of the screen into the suggested UI. The application provides furthermore editing functional- ities for the Binding to a web service (field “Controller” on the lower left hand side), the Layout (field “Layout” in the lower middle of the screen) and the Theme (field “Theme” on the lower right hand side). Storing the changes triggers the knowledge acquisition procedure, depicted in Fig. 5.4. For each dimension, the system calculates difference lists as described in section 4.4. These are shown to the user, who selects the dimensions which were relevant for her decision to modify the UI. The case repository is updated with the new case, and the new UI is stored in the component repository. New [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.3 classstructureforuise 91 Figure 5.3.: Suggested Create Sales Order UI in UISE and Editing Functionalities rules and conclusions are derived from the difference lists and stored into the database for all four dimensions. 5.3 class structure for uise Figure 5.5 displays the class diagram of the UISE prototype. In the following, we will describe the classes and their attributes. We can distinguish between classes that belong to the condition, and classes that belong to the conclusion of a rule. Both sides are tied together by the Rule class. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.3 classstructureforuise 92 UI Modification Difference Lists Save data Calculate difference lists store rules Composition Rule Layout Engine Binding Rules Theme Cases Figure 5.4.: Recommender System: Knowledge Acquisition (top: User; bottom: System) 5.3.1 Classes forming the Rule Condition The following classes belong to the rule Condition: • Class Device is used for describing Devices and their attributes. Devices are ordered in a hierachy of devices (therefore attribute ParentID is required). Various attributes of the device can be maintained, i.e., the screen resolu- tion, screen size, screen orientation (landscape, portrait), keyboard (qwer- ty/number), and the pointing method (touch screen/stylus). Furthermore, the class contains attributes for the operating system of the device, and the URL of the Device Image that will be displayed next to the device descrip- tion in UISE. • Scenario is a class for Business Scenarios. Business Scenarios in UISE are ordered in hierarchy of scenarios and subscenarios. Therefore, we are using attribute ParentID in this class. • Class Case represents an RDR case with a specific combination of Device (DeviceID) and Business Scenario (ScenarioID). Attribute Action can be used to specify if a screen for a Create, Change, or Display action shall be created, e.g., for creating, changing or displaying sales orders. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.3 classstructureforuise 93 • Condition is the input into a rule. Multiple conditions can belong to a rule, Attribute (e.g., a scenario or a device), the Value of this attribute (e.g., 1 for Business Scenario 1 Sales Order Management), and a RuleID (e.g., 68) to show to which rule the condition belongs to. • The KnowledgeBase class contains the RootruleID (root of a rule tree) for the four dimensions Layout, Theme, Binding and Composition. • Each Rule is associated with a Conclusion. Following the RDR (Ripple- Down Rules) approach, a rule might be connected to an exception to the rule (ExceptRuleID) and an alternative rule that is checked if the current rule doesn’t hold true (FalseRuleID). The corner stone case (CornerstoneCa- seID) is the case that is added to the rule tree when none of rules contained in the knowledge base holds true for the new scenario and device chosen. 5.3.2 Classes forming the Rule Conclusion Each Conclusion is associated with an ID, an author who created the conclu- sion, and, as a new conclusion might have to be approved by a development lead, a status. The status can be, e.g., “sent to approver”, “approval pending”, “approved”. The following classes belong to the conclusion: • Class Submission represents the binding to a web service. In the MVC environment, a controller is written that represents the web service func- tionality (attribute ControllerName points to the controller, e.g., Sales Order Controller). The action that will be executed is given by the ActionName (e.g., CREATE, SUBMIT). Corresponding to the action performed, we can create a button with aButtonText (e.g., button “Create”, “Submit”). • The Layout class specifies in which way the UI components are arranged on the screen, e.g., in a horizontal or vertical manner. The ViewName indi- cates the view the layout is associated with, e.g., a view for a horizontal layout, a vertical layout, a collapsible vertical layout. The Icon is a small im- age of the layout that eases the selection of the layout on the UISE screen. • The Component is a UI component, which can range from fine-grained to coarse-grained components, up to entire UIs. Each component is associated with a Binding to a web service, a Theme (Stylesheet), a Composition (Com- positionID) and a Layout (LayoutID). The Title is what appears above the [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.3 classstructureforuise 94 component on the UISE screen. A description provides the UI developer with information what the UI component is used for. ViewName indicates the view the component is associated with, the ControllerID detects the controller. Attribute Name is the name under which the component can be selected, e.g., UI component Sales Order Date Section. • A component can be hidden (class Hide), Labels on the screen can be changed (class Label) depending on the context. Both classes were not used in the current implementation of the prototype, but can be integrated into future versions of UISE. • The Composition defines which UI components belong to a UI. • The Containment defines combinations of compositions and components, and at which position of the screen the component is added (e.g., position 3 in a vertical layout means the component is added beneath the first two components). • The Theme is the style sheet that is applied to the UI component. The Title of the theme is the name under which the style sheet can be selected in the UISE prototype. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.3 classstructureforuise 95 «) ID CompositionID ComponentID Position Component Composition Containment Eigenschaften ILI~~IJ:l Navigationseigenscha… 'ffl'rm' J @ l~ rn rn 0 0 * I Conclusion 1 * A Title Style Script Components Theme 1' @ Eigenschaften 'h~!Jn Navigationseigenscha… ~ rn rn Q "' 0..1 Conclusion Containments Composition 1' Eigenschaften Navigationseigenscha… 1!1' -i' rn rn v :«) 0..1 * * ,0, 1 , 0, ,,0,, i«l «) ~ 1 * ID ComponentID Field Text Component Label Eigenschaften itllfi'hlfi Navigationseigenscha… 'if () ·~ rn rn tl- «) ID RuleID Author Created Status Rule ID Title LayoutID ViewName ControllerName SubmissionID ThemeID CompositionID Description Name Hides Labels Composition Theme Submission Layout 1 * Conclusion Component () Eigenschaften i.tl:fiiJ:ltJIJ:i Navigationseigenscha… 'if Eigenschaften ilil'htJIJ:i'htJ'fi'h'hiJ:i Navigationseigenscha… @'ilf''if@'jiJ''if ~ rn rn ~ rn rn Q Q 1 * v * 0..1 ID ComponentID Field Component Hide Eigenschaften Navigationseigenscha… * 0..1 * lilfi'h .r I ~ rn rn [«) I Conclusion 0..1 Title ButtonText ControllerName ActionName ResponseCompon… ResponseCompon… Submission 1' Diagram for the UISE prototype Eigenschaften 'h~ltl~:fi Navigationseigenscha… @ ~ rn rn "' I Conclusion Title ViewName Icon Components Layout 1' Eigenschaften Navigationseigenscha… ~ rn 'ht~IJ:i rn "'I 5 . .: Class 0..1 A 0..1 @ @ >--- Figure 0..1 * 0..1 * ID FalseRuleID ExceptRuleID ConclusionID CornerstoneCaseID Conclusion Conditions ExceptRule FalseRule KnowledgeBases CornerstoneCase ~ 0..1 * Rule * 0..1 Eigenschaften ll~ltl'h~ Navigationseigenscha… 'ffl'liil'iil'Wiifiil' @ * 1 ID ParentID Title Description Children Parent ~ ~ rn []] Scenario Eigenschaften Navigationseigenscha… ilf'jif v ~ IP:fi~'h 1 .;• []] rn 0..1 @ ID ScenarioID DeviceID Action Device Scenario Rules * 1 Case Eigenschaften Navigationseigenscha… * * ll~~~ ilf'jifll!l' ~ []] rn t«J '«] ~· 0..1 * ID ParentID Title Description SourceDeviceID Brand Image ResolutionX ResolutionY SizeX SizeY Keyboard ScreenOrientation PointingMethod OperatingSystem Browser Children Parent Device Eigenschaften i.tltJIJ:iltl'hiJ:l~'h~~lfi~~'h~~ Navigationseigenscha… ill' 'if []] rn ID RootRuleID Title RootRule ID Attribute Value RuleID Rule KnowledgeBa… Condition -.Eigenschaften :]Navigationseigenscha… Eigenschaften ilil'htJ'tl Navigationseigenscha… ll!l' "' ¥ ¥ []] rn [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 96 5.4 knowledge base content elicitation for uise In order to enable a realistic evaluation, we filled the context-related part of the KB with real-world content about devices and business scenarios. 5.4.1 Elicitation of the Device Hierarchy for UISE In order to capture the characteristics of different devices such as Mac or Win- dows desktop, Apple iPhone, iPad, and different versions of mobile phones, we researched existing device databases. Our goal was to represent devices in a hierarchical way, enabling the user to choose between different levels of de- vice specification, ranging from rather generic device descriptions (e.g., mobile phone, Windows desktop) to very detailed descriptions on a brand- and model- based level (e.g., Nokia C5-00, Apple iPhone 4S ). Aiming at identifying a device hierarchy well suited for our approach, we analysed and compared the following device databases: • MDBF • Volantis • UAprof • WURFL In the following section, we describe and compare the named device databases in detail. 5.4.1.1 MDBF Mobile Device Browser File (MDBF) is an open source database that contains the capability definitions of over 400 mobile devices and browsers [13]. The data stored in MDBF was gathered from the WURFL device database (see below) and other sources. When used together with ASP.Net, the header information of the incoming requests is used to detect the mobile device or the browser that has sent the request. Information is exposed through the Request.Browser property1. MDBF defines 67 capabilities or properties of mobile devices and 1 For more information on the Request.Browser property, see [73]. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 97 browsers than can be used to render UIs according to the device / browser specifications. The capabilities range from screen size to cookie support. MDBF is part of the CodePlex project, and had its final release in August 2010. Today, MDBF is not maintained any more. Fig. 5.6 displays the device hierarchy used for MDBF, showing an ID for the device (e.g., iPhone) and its parent (e.g., Apple) in the browser tag. Figure 5.6.: Device Hierarchy used for MDBF 5.4.1.2 Volantis Volantis is a Java-based mobile content delivery platform and development en- vironment (Eclipse, WebSphere plugins). In February 2011, Volantis contained 8000 devices with over 850 attributes [112]. Volantis was updated on a regular basis as part of the Volantis Device Program. In February 2011, Volantis was purchased by mobile applications developer Antenna Software [117]. Volantis is a library of mobile UI widgets with abstract, device-independent UI descrip- tions (based on XHTML Device Independant Markup Extensions (XDIME)2). It contains a separate XML document for each device. We can distinguish the fol- lowing types of XML documents used: • identification.xml -specifies regular expressions for identifying user agents from the header information (see Fig. 5.7) 2 For further information on XDIME, please refer to [119] [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 98 • definitions.xml -specifies all available “policies” (capabilities / features) and their data types (see Fig. 5.8) Figure 5.7.: Device Identification used for Volantis Figure 5.8.: Device Format used for Volantis Fig. 5.9 shows the device hierarchy used by Volantis, going from coarse-grained device classes such as “Tablet” to a more fine-grained device model level (e.g., “Nokia-E61i-OSS”). 5.4.1.3 WURFL WURFL [59], the Wireless Universal Resource File by Luca Passani / ScientiaMo- bile, is a Device Description Repository (DDR) that stores the descriptions of [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 99 <:1:·/icc: nru·.-.::• "14blet•::- • ~'.o:·.lio.·o: W:1:11::- 'tlu)..i.4.-0S:S-BLufllo'~L'' :· .:.dev:.ca r.$.10e= •R'of.".1a-B61-0SS' ;. Figure 5.9.: Device Hierarchy used for Volantis several thousand devices. WURFL is a framework that enables applications to map incoming HTTP requests to a description of the capability of the requesting device. The device descriptions are maintained in XML. Originally designed for mobile devices only (in the year of its creation 2001, the description “wireless” corresponded to today’s term “mobile”), WURFL is now storing data for “every HTTP-client worth recognizing” [59], including tablets and smartTVs. The data in WURFL is added by a number of approved “contributors”, which are typically representatives of big mobile companies or operators. Once an open source database, WURFL is now distributed to the community of WURFL adopters with a license. It offers an API for Java, PHP, databases (TeraWURFL) and ASP.net, and is available as a cloud solution. The cloud client can be used by hobbyists and micro companies for free. WURFL is hierarchically structured, containing information on properties that are grouped in feature groups, such as: • Product (model, version, release date, OS, browser, keyboard, pointing method, ...) • Display (physical size, resolution, orientation) WURFL defines a fall-back for every device: Based on the observation that new device models are often using the same software as their predecessors, WURFL links devices to descriptions of “fall-back” devices, which are typically older models of the same manufacturer. The fall-back strategy can be used to make the repository more compact, and to reasonably predict the functionality of new devices. Programming APIs can traverse the device hierarchy and thereby make guesses about the capability of a device. “Generic” devices are devices at the top of a WURFL file. Typically character- ized by the most basic features (e.g., small screens, only basic XHTML support), generic devices represent devices that couldn’t be recognized, and guarantee [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 100 that for every device at least a generic device can be found. They furthermore represent a termination point for all fall-back chains. Fig. 5.10 shows a WURFL device description maintained in XML. As a mini- mum, the device hierarchy contains a user agent string, a device-id and a fall- back attribute, which can be used, as described above, to infer more information about the device by traversing the information of linked device descriptions. Figure 5.10.: Device Hierarchy used for WURFL 5.4.1.4 UAProf UAProf [53], short for “User Agent Profile Specification”, is a standard by the Open Mobile Alliance and based on the data provided by the WURFL project [59]. Maintained as XML-documents, UAProf describes the capability of devices and browsers, offering one document per device. The registry of UAProf doc- uments is available at http://www.uaprof.com/. UAProfs are Resource Descrip- tion Framework (RDF)-based, which means that the document schema is extensi- ble. In the community-driven approach, data about devices is contributed by var- ious parties, e.g., for Global System for Mobile Communications (GSM) devices, it is provided by the vendors like Nokia and Samsung, whereas for Code Division Multiple Access (CDMA) / Binary Runtime Environment for Wireless (BREW) de- vices, it is more likely to be maintained by a telecommunications company (Ver- [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 101 izon, Sprint). The UAProf project-owners do not guarantee for the accuracy and correctness of the data. Users are however invited to check the data for errors and correct the device descriptions if needed. According to [59], UAProf can be classified as an industry standard for repre- senting device capabilities. As this information is unlikely to be sent over the internet with every single request, the UAProf document is stored in a pub- licly accessible repository, and an UAProf URL is provided in the header of the HTTP-request of a mobile device. A typical UAProf document contains in- formation about the hardware platform, software platform, browser user agent, network characteristics, and Wireless Application Protocol (WAP) characteristics, each with a predefined collection of possible attributes [34]. Fig. 5.11 shows an example of a UAProf structure. Figure 5.11.: Device Hierarchy used for UAProf According to [34] and our own observations, there are certain drawbacks to the use of UAProfs: • Not all devices have UAProfs and descriptions are not available for every device, e.g., UAProfs for Apple products were not available at the time of the creation of our prototype. • Errors in the data or the schema of UAProfs can result in parsing failures. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 102 • Not all UAProfs that are advertised are actually available. According to UAProfile.com, around 20% of the links supplied by handsets are unavail- able. • There is no industry-wide quality standard for the data in a UAProf. • Data in the UAProf headers can be completely incorrect, e.g., it might be data for another device. • Retrieving and parsing a UAProf document in real-time can be quite time- consuming, so that a significant overhead is added to web requests. UAProfs have to be cached in a Device Description Repository, which has to be up- dated on a regular basis in order to capture device deprecation. • The UAProf document might not contain the user agent of the device the documents refers to. UAProf is furthermore not hierarchically structured, the device data is stored in separate documents without any references to similar devices/devices in the same device family. Due to the drawbacks described above, and to the missing hierarchical structure, UAProf was considered as not being applicable to our ap- proach. 5.4.1.5 Elicitation of the Device Hierarchy for UISE - Discussion The device database that we found most suitable for our approach was WURFL. The way its device hierarchy is structured, and the features provided such as fall-back devices made this database a good fit. At the time of the creation of the prototype, WURFL was furthermore updated on a regular basis. Feeding our prototype with the latest device information was as simple as replacing the WURFL file with its updated version. Further device databases which weren’t taken into account for this analysis, but which shall be mentioned here, are DeviceAtlas [21], DetectRight [20] and Mo- bileAware [70]. [ Context-aware UI Component Reuse for Web Service Development Environments ] 5.4 knowledge base content elicitation for uise 103 5.4.2 Elicitation of the Business Scenario Hierarchy for UISE Similar to the elicitation of a device hierarchy, we aimed at establishing a hier- archy of business scenarios. The user should have the option to define UIs for different levels of a business scenario hierarchy, starting at a generic level like the scenario Sales Order Management, and going to more fine-grained levels like scenario Sales Order Management–Quotation–Web Auction Quotation . In contrast to the device hierarchies, we didn’t make use of an open source database, but derived a business scenario hierarchy directly from the SAP CRM 7.0 system. We explored transaction CRMD_ORDER 3 , which is a central appli- cation used in the CRM system for the creation, update and display of all kind of CRM sales orders, service orders, activities and contracts. Fig. 5.12 displays an extract of the resulting business scenario hierarchy in our approach. The entire business scenario hierarchy contains 115 SAP CRM scenarios on 4 different levels.