6
DynaRIA: a Tool for Ajax Web Application Comprehension Dipartimento di Informatica e Sistemistica University of Naples “Federico II”, Italy Domenico Amalfitano Anna Rita Fasolino Armando Polcaro Porfirio Tramontana 18th IEEE International Conference on Program Comprehension Braga, Portugal 30 June - 2 July, 2010

DynaRIA: a Tool for Ajax Web Application Comprehension

Embed Size (px)

DESCRIPTION

Thanks to Rich Internet Applications (RIAs) with their enhanced interactivity, responsiveness and dynamicity, the user experience in the Web 2.0 is becoming more and more appealing and user-friendly. The dynamic nature of RIAs and the heterogeneous technologies, frameworks, communication models used for implementing them negatively affect their analyzability and understandability. Consequently, specific software techniques and tools are needed for supporting RIA comprehension. This paper presents DynaRIA, a tool for the comprehension of RIAs implemented in Ajax that is based on dynamic analysis. It provides functionalities for recording and analyzing user sessions from several perspectives, and for producing various types of abstractions and visualizations about the run-time behavior of the application. In order to evaluate this tool, four case studies involving different comprehension tasks of Ajax applications have been executed. The experimental results showed the usefulness and effectiveness of the tool that provided a valid support for Ajax comprehension in reverse engineering, debugging, testing and quality assessment contexts.

Citation preview

Page 1: DynaRIA: a Tool for Ajax Web Application Comprehension

DynaRIA: a Tool for Ajax Web Application ComprehensionDipartimento di Informatica e Sistemistica

University of Naples “Federico II”, Italy

Domenico AmalfitanoAnna Rita FasolinoArmando PolcaroPorfirio Tramontana

18th IEEE International Conference on Program Comprehension

Braga, Portugal 30 June - 2 July, 2010

Page 2: DynaRIA: a Tool for Ajax Web Application Comprehension

Background

ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010

• Ajax is a set of Web Technologies (XHTML, JavaScript , XML, and XMLHttpRequest) used for implementing a new generation of Web applications (Rich Internet Applications).

• Key aspects of Ajax applications:▫ The UI is composed by widgets that are updated, deleted or

added independently at run time.▫ The UI is dynamically built on the basis of the events that are

fired by the user.▫ Events are managed by an Ajax Engine (AE).

• The Ajax Engine (AE) composed of JavaScript modules▫ manipulates the UI components,▫ communicates with the server (exchanges few amounts of data, by

asynchronous or synchronous requests)• Most popular examples are: Google Maps, Flickr, Gmail,

etc.

Page 3: DynaRIA: a Tool for Ajax Web Application Comprehension

Challenges for AJAX application comprehension• Heterogeneous nature (JS, DOM, XML, ...)

▫ Several parsers are needed• Dynamically configured code (JS code is loaded or built at

run-time)▫ code static analysis is not sufficient

• Based on large variety of frameworks▫ make their behaviour opaque and complicate the

analysis of generated code• DynaRIA is a tool designed for the comprehension of Ajax

applications based on dynamic analysis of user sessions.• It produces several types of abstractions and

visualizations about the run-time behaviour of the application.

ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010

Page 4: DynaRIA: a Tool for Ajax Web Application Comprehension

The approach of DynaRIA –user session analysis • User sessions are traced and recorded through the

Web browser offered by DynaRIA. • Each user session trace collets the following data:

▫ User events fired on widgets of the UI. ▫ JavaScript functions activated by user event handlers.▫ Executed lines of code of JS functions. ▫ Changes (such as add, delete, or change) to UI

widgets by DOM analysis.▫ Message exchanges between client and server.▫ Exceptions and errors occurred at run time (such as

JavaScript errors, Network warnings, etc.).

• Collected information about user sessions are shown in several Session Monitor Views provided by the tool.

ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010

Page 5: DynaRIA: a Tool for Ajax Web Application Comprehension

The approach of DynaRIA – UML sequence diagram abstraction• DynaRIA abstracts UML sequence diagrams at various levels of

detail and abstraction from each user session or from its parts.• UML sequence diagrams are viewed and managed by another

tool, dynaRIA Sequence Diagram Viewer.

ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010

Excerpt of an high level UML sequence diagram

Excerpt of a low level UML sequence diagram

Page 6: DynaRIA: a Tool for Ajax Web Application Comprehension

The approach of DynaRIA – testing and debugging activity support• DynaRIA provides functionalities of Capture

& Replay.• During user session replay, the tool:

▫traces the JS code execution and keeps track of performed network traffic,

▫detects run-time JS exceptions (such as JS syntax errors, array out of bound errors, etc.) and network warning occurred at run-time.

• The tool computes several JS code coverage metrics with respect to a replayed set of user sessions.

ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010