Migrating Multi-Page Web Applications to Single-Page Ajax Interfaces

Migrating Multi-Page Web Applications to Single-Page Ajax Interfaces

Delft University of Technology Software Engineering Research Group Technical Report Series Migrating Multi-page Web Applications to Single-page Ajax Interfaces Ali Mesbah and Arie van Deursen Report TUD-SERG-2006-018 2nd revision SERG TUD-SERG-2006-018 2nd revision Published, produced and distributed by: Software Engineering Research Group Department of Software Technology Faculty of Electrical Engineering, Mathematics and Computer Science Delft University of Technology Mekelweg 4 2628 CD Delft The Netherlands ISSN 1872-5392 Software Engineering Research Group Technical Reports: http://www.se.ewi.tudelft.nl/techreports/ For more information about the Software Engineering Research Group: http://www.se.ewi.tudelft.nl/ c copyright 2006, Software Engineering Research Group, Department of Software Technology, Faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology. All rights reserved. No part of this series may be reproduced in any form or by any means without prior written permission of the publisher. Mesbah & van Deursen – Migrating Multi-page Web Applications to Single-page Ajax Interfaces Migrating Multi-page Web Applications to Single-page AJAX Interfaces Ali Mesbah Arie van Deursen Software Engineering Research Group Software Engineering Research Group Delft University of Technology Delft Univ. of Technology & CWI The Netherlands The Netherlands [email protected] [email protected] Abstract web sites if their user friendliness is inadequate. Many or- ganizations are beginning to consider migration (ajaxifica- Recently, a new web development technique for creating in- tion) possibilities to this new paradigm which promises rich teractive web applications, dubbed AJAX, has emerged. In interactivity and satisfaction for their clients. As a result, this new model, the single-page web interface is composed the well-known problem of legacy migration is becoming in- of individual components which can be updated/replaced creasingly important for web applications. If until a year independently. If until a year ago, the concern revolved ago, the problem revolved around migrating legacy systems around migrating legacy systems to web-based settings, to- to web applications, today we have a new challenge of mi- day we have a new challenge of migrating web applications grating classic web applications to single-page web applica- to single-page AJAX applications. Gaining an understand- tions. ing of the navigational model and user interface structure of The main question addressed in this paper is how to iden- the source application is the first step in the migration pro- tify appropriate candidate single-page components from a cess. page sequence interface web application. Obtaining a clear In this paper, we explore how reverse engineering tech- understanding of the navigational model and user interface niques can help analyze classic web applications for this structure of the source application is an essential step in the purpose. Our approach, using a schema-based clustering migration process. technique, extracts a navigational model of web applica- In this paper, we present a reverse engineering technique tions, and identifies candidate user interface components to for classification of web pages. We use a schema-based clus- be migrated to a single-page AJAX interface. Additionally, tering technique to classify web pages with similar struc- results of a case study, conducted to evaluate our tool, are tures. These clusters are further analyzed to suggest can- presented. didate user interface components for the target AJAX appli- cation. 1. Introduction The rest of this paper is organized as follows. We start out, in Section 2 by exploring AJAX and focusing on its charac- Despite their enormous popularity, web applications have teristics. Section 3 presents the overall picture of the migra- suffered from poor interactivity and responsiveness towards tion process. Section 4 describes our page classification no- end users. Interaction in classic web applications is based on tion and proposes a schema-based clustering approach. Sec- a multi-page interface model, in which for every request the tion 5 outlines how we identify candidate user interface com- entire interface is refreshed. ponents. The implementation details of our tool, called RET- Recently, a new web development technique for creating JAX, are explained in Section 6. Section 7 evaluates a sample interactive web applications, dubbed AJAX (Asynchronous web application and its recovered navigational and compo- JavaScript And XML) [14], has emerged. In this new model, nent model by applying RETJAX. Section 8 discusses the re- the single-page web interface is composed of individual sults and open issues. Section 9 covers related work. Finally, components which can be updated/replaced independently, Section 10 draws conclusions and presents future work. so that the entire page does not need to be reloaded on each user action. This, in turn, helps to increase the levels of in- teractivity, responsiveness and user satisfaction [20]. 2. AJAX Adopting AJAX-based techniques is a serious option not As defined by Garrett [14],SE AJAX incorporates:RG standards- only for newly developed applications, but also for existing based presentation using XHTML and CSS, dynamic display TUD-SERG-2006-018 2nd revision 1 Mesbah & van Deursen – Migrating Multi-page Web Applications to Single-page Ajax Interfaces 1 and interaction using the Document Object Model, data in- Web App Page deltaChange terchange and manipulation, asynchronous data retrieval us- 1..* <<build>> ing XMLHttpRequest, and JavaScript binding everything to- viewChange Widget View gether. deltaUpdate AJAX is an approach to web application development uti- 1..* lizing a combination of established web technologies to pro- <<UI Component>> vide a more interactive web-based user interface. It is the combination of these technologies that makes AJAX unique <<Input>> <<Output>> <<Navigation>> <<Layout>> on the Web. Well known examples of AJAX web applica- Generic Part Specific Part Data tions include Google Suggest, Google Maps, Flickr, Gmail Button Image Tree File Label and the new version of Yahoo! Mail. Tab Panel PanelCell Taskbar 1..* AJAX enables web developers to create web applications Text Anchor Window based on a single-page interface model in which the client- Menubar Select Hidden /server interaction is based merely on state changes. The Secret communication between client and server can take place Textarea Modal asynchronously, which is substantially different from the Radio Checkbox classic synchronous request, wait for response, and continue model [20]. Figure 1. The meta-model of a single-page AJAX Figure 1 shows a meta-model of a single-page AJAX web application composed of UI components. application which is composed of widgets. Each widget, in turn, consists of a set of user interface components. The spe- cific part of the meta-model is target specific, i.e., each AJAX 2. Navigational Path Extraction framework provides a specific set of UI components at dif- ferent levels of granularity. The client side page is composed 3. UI Component Model Identification of client-side views, which are generated by the server-side 4. Single-page UI Model Definition widgets/components. Navigation is through view changes. For each view change, merely the state changes are inter- 5. Target UI Model Transformation changed between the client and the server, as opposed to the full-page retrieval approach in multi-page web applications. Below we briefly discuss each of these steps. The main The architectural decisions behind AJAX change the way focus of this paper is on steps two and three, i.e., finding can- we develop web applications. Instead of thinking in terms of didate user interface components to be able to define a single- sequences of Web pages, Web developers can now program page user interface model. Nevertheless, we will shortly their applications in the more intuitive single-page user in- present how we envision the other steps which are currently terface (UI) component-based fashion along the lines of, for part of our ongoing research. instance, Java AWT and Swing. Retrieving Pages An overview of the architectural – processing, connect- Looking at dynamic web applications from an end-user’s ing, and data – elements of AJAX, and the constraints that perspective enables us to gain an understanding of the ap- should hold between them in order to meet such properties plication without having to cope with the many different as user interactivity, scalability, and portability is given by server-side web programming languages. Building a run- our SPIAR [20] architectural style for AJAX applications. time mirror-copy of the web pages can be carried out by ap- plying static as well as dynamic analysis techniques. Static 3. Migration Process analysis can examine the pages and find href links to other internal pages. Dynamic analysis can help up to re- What we would like to achieve is support in migration from a trieve pages which require specific request parameters (form- multi-page web application to a single-page AJAX interface. based), for instance, through scenario-based test cases or col- In this section we describe the steps needed in such a process. lecting traces of user actions (e.g., sessions, input data) inter- Figure 2 depicts an overall view of the migration process. acting with the web application. It is clear that the more our Note that we are primarily focusing on the user interface and retrieved mirror-copy resembles the actual web application, not on the server-side code (which is also an essential part of the better our navigational path and UI component identifi- a migration process). The user interface migration process cation will be. consists of five major steps: Navigational Path Extraction 1. Retrieving Pages In order to migrate from a classicSE webRG application (source) to a single-page AJAX interface (target), we first need to gain an 2 TUD-SERG-2006-018 2nd revision Mesbah & van Deursen – Migrating Multi-page Web Applications to Single-page Ajax Interfaces Nav. Classic Web The identified list of candidate components along with the Model Nav.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us