Rich Internet Application Development
Total Page:16
File Type:pdf, Size:1020Kb
Bachelor Thesis RICH INTERNET APPLICATION DEVELOPMENT Markus Moldaschl 0751916 Thesis advisor: ao. Univ.-Prof. Dr. Rony G. Flatscher Institute for Management Information Systems Vienna University of Economics and Business Administration Abstract page 3 Abstract This Bachelor thesis introduces the reader to basic concepts of Rich Internet Appli- cation (RIA) development. It outlines why traditional web applications fail to live up to expectations of today‘s web clients and describes how Rich Internet Applications excel in terms of user experience by closing the gap between the web and the desktop conglomerate. Furthermore, the project presents selected, leading edge RIA development frame- works. On the basis of AJAX, Adobe Flex, Microsoft Silverlight and JavaFX distinc- tive key functionality is discussed in great detail and benefits and weak spots along with suggested areas of application are highlighted. In conclusion, the thesis briefly depicts HTML 5 and meets concerns of the ines- capable question, whether HTML 5 will have a significant impact on proprietary RIA solutions or even make them obsolete or not. Keywords: RIA, AJAX, JavaScript, Adobe Flex, Flash, AIR, Microsoft Silverlight, JavaFX, Java, Java Scripting, BSF, BSF4ooRexx, HTML 5 Table of Contents page 4 Table of Contents 1 Introduction ....................................................................................................... 11 1.1 Motivation and Goal .................................................................................... 11 1.2 Thesis Structure ......................................................................................... 12 2 Overview of Rich Internet Applications .............................................................. 13 2.1 The Evolution of Web Applications ............................................................. 13 2.2 Functionality and Characteristics of RIAs ................................................... 17 2.2.1 RIA Architecture .............................................................................. 17 2.2.2 Main Characteristics ........................................................................ 19 2.3 Emphasize the User Experience (UX) ........................................................ 20 2.3.1 RIA as Part of Process Automation ................................................. 22 2.4 Types of RIAs ............................................................................................. 22 2.4.1 Technology study ............................................................................ 23 3 AJAX ................................................................................................................. 27 3.1 Basics of AJAX ........................................................................................... 27 3.1.1 The AJAX Engine ............................................................................ 27 3.1.2 DHTML ............................................................................................ 29 3.1.3 XML ................................................................................................. 32 3.1.4 XMLHttpRequest ............................................................................. 33 3.2 Digression: Web Services and Frameworks ............................................... 36 3.2.1 Web Services .................................................................................. 36 3.2.2 Frameworks ..................................................................................... 40 3.3 Example Application ................................................................................... 42 4 Adobe Flex ........................................................................................................ 49 4.1 Specification ............................................................................................... 49 4.1.1 Runtime Environments .................................................................... 49 4.1.2 Language Characteristics ................................................................ 50 4.1.3 Deployment ..................................................................................... 53 4.2 Data Binding and Data Validating ............................................................... 54 4.3 Remote Service Handling ........................................................................... 56 4.3.1 Data Service Wizards ...................................................................... 58 4.3.2 AMF ................................................................................................. 62 Table of Contents page 5 4.4 Interaction with the Environment ................................................................. 62 4.5 Adobe Integrated Runtime (AIR) ................................................................. 67 5 Microsoft Silverlight ........................................................................................... 71 5.1 Specification ............................................................................................... 71 5.1.1 Runtime Environment ...................................................................... 72 5.1.2 Language Characteristics ................................................................ 72 5.1.3 Deployment ...................................................................................... 74 5.2 Data Binding ............................................................................................... 76 5.3 Remote Service Handling ........................................................................... 81 5.4 Interaction with the Environment ................................................................. 86 5.5 Silverlight Out-of-Browser ........................................................................... 90 6 JavaFX .............................................................................................................. 94 6.1 Specification ............................................................................................... 94 6.1.1 Runtime Environment ...................................................................... 94 6.1.2 Language Characteristics ................................................................ 95 6.1.3 Deployment ...................................................................................... 99 6.2 Data Binding and Triggering...................................................................... 103 6.3 Remote Service Handling ......................................................................... 106 6.4 Interaction with the Environment ............................................................... 111 6.4.1 Interaction with JavaScript ............................................................. 111 6.4.2 Interaction with Java ...................................................................... 114 7 Evaluation ........................................................................................................ 126 7.1 Evaluation of AJAX ................................................................................... 126 7.2 Evaluation of Flex ..................................................................................... 129 7.3 Evaluation of Silverlight ............................................................................. 131 7.4 Evaluation of JavaFX ................................................................................ 133 7.5 Recommendations .................................................................................... 136 8 HTML 5 Outlook .............................................................................................. 138 9 Round-up and Outlook..................................................................................... 144 10 References ...................................................................................................... 145 Figures page 6 Figures Figure 1: RIA Combining Advantages from the Web and the Desktop Sphere ...... 15 Figure 2: Evolution of Web applications [DBBO07] ............................................... 16 Figure 3: Caricature on the RIA Evolution ............................................................. 16 Figure 4: Typical RIA Architecture ......................................................................... 18 Figure 5: Job Trends Concerning AJAX, Flex, JavaFX and Silverlight .................. 24 Figure 6: Market Penetration and Usage of Plug-in Based Technologies .............. 24 Figure 7: Plug-in Support Detected on Systems of Visitors of http://riastats.com/ . 25 Figure 8: Classic Synchronous Wait-Refresh-Cycle [DeveAJ] ............................... 28 Figure 9: Partial UI Updates and Asynchronous Communication with AJAX [DeveAJ] ................................................................................................................ 28 Figure 10: DOM Example: Initial State .................................................................. 31 Figure 11: DOM example: Elements and Styles Manipulated ................................ 32 Figure 12: AJAX Process Flow .............................................................................. 34 Figure 13: Using a Proxy to Obtain Cross Domain Access .................................... 37 Figure 14: showLoading Widget in Action.............................................................. 44 Figure 15: Auto Completion with jQuery UI Library ................................................ 45 Figure 16: datePicker for Date Input .....................................................................