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.
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
DynaRIA: a Tool for Ajax Web Application Comprehension
1. 18th IEEE International Conference on Program Comprehension
Braga, Portugal
30 June - 2 July, 2010
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
2. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
Background
• 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.
3. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
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.
4. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
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.
5. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
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.
Excerpt of an high level UML sequence diagram Excerpt of a low level UML sequence diagram
6. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
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.
7. ICPC 2010, Braga, Portugal; 30 june - 2 july, 2010
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.
Notas do Editor
A voce: This type of diagram can be used for obtaining a comprehension of the set of fired user events, of events causing DOM changes, synchronous and asynchronous requests to the server, as well as obtained server responses