Your SlideShare is downloading. ×
0
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Towards a Better Comprehensibility of Web Applications: Lessons Learned from Reverse Engineering Experiments

178

Published on

The rapid diffusion of Internet has triggered a growing request for new Web sites and Web Applications (WA). …

The rapid diffusion of Internet has triggered a growing request for new Web sites and Web Applications (WA).
Due to the pressing market demand, new WAs are usually developed in a very short time, while existing WAs are modified frequently and quickly. In these conditions, the well-known software engineering principles are not usually applied, as well as well-defined software processes and methodologies are rarely adopted. As a consequence, WAs usually present disordered architectures, poor or non-existing documentation, and can be analyzed, comprehended and modified with a considerable effort.
Reverse engineering methods and tools are being proposed in order to reduce the effort required to comprehend existing WAs and to support their maintenance and evolution. In this paper, the experimentation of a reverse engineering approach is described. Experimentation was carried out with the aim of assessing which characteristics of a WA mostly affect comprehensibility. The results of the experiments highlighted a set of techniques and best practices that should be applied for producing best analyzable and maintainable WAs.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
178
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 1WSE 2002, Montreal, CanadaTowards a Better Comprehensibilityof Web Applications:Lessons Learned from ReverseEngineering ExperimentsP. TramontanaG. A. Di Lucca, A.R. FasolinoDipartimento di Informatica e SistemisticaUniversity of Naples Federico II, Italy
  • 2. 2WSE 2002, Montreal, CanadaWeb Applications (WA):problems and open issues• The development of Web sites and applications isincreasing dramatically to satisfy the marketrequests. The software industry is facing the newdemand under the pressure of a very short time-to-market and an extremely high competition.⇒Web sites and applications are usually developedwithout a disciplined process: poor documentation isproduced to support the subsequent maintenanceand evolution activities, thus compromising thequality of the applications
  • 3. 3WSE 2002, Montreal, CanadaManaging existing Web Applications⇒Due to the large number of employed technologies,understanding, maintaining and evolving a dynamicapplication is a complex task …• Reverse Engineering methods and techniques havebeen proposed for…– Analyzing the functional behavior of an existing WA– Reconstructing the architecture of the WA– Capturing and reusing the design of the application– Modeling static and dynamic views by UML diagrams (usecases, sequence and class diagrams)– …
  • 4. 4WSE 2002, Montreal, CanadaProblems in analysis- Presence in a WA of several heterogeneous softwarecomponents, developed with different technologiesand coding languages- Absence of effective mechanisms for implementingthe well-known software engineering principles ofmodularity, encapsulation, and separation ofconcerns, may significantly make harder thecomprehension of an existing WA
  • 5. 5WSE 2002, Montreal, CanadaReverse Engineering Web ApplicationsFive main steps:1) Static Analysis of the WA2) Dynamic Analysis of the WA3) Automatic Clustering of the WA4) Validation of the clustering5) Abstraction of UML diagrams
  • 6. 6WSE 2002, Montreal, CanadaThe conceptual model of a WAClient Pagewith FrameClient ModuleWeb ObjectWeb Page0..n0..n0..n redirect0..n0..n0..n0..n0..nLoad in FrameClient Page0..n0..n include0..n0..n0..n0..n0..n0..nlinkServer Page0..10..1 0..10..1 build0..n0..n 0..n0..nsubmit0..n0..n0..ninclude0..n• Components: Client pages, server pages, client page with frames,client modules, web objects.• Relationships: Link, submit, redirect, build, load_in_frame, include.
  • 7. 7WSE 2002, Montreal, Canada1) Static Analysis of the WA– This kind of analysis can be carried out with thesupport of a multi-language code parser, such asWARE, a tool that statically analyzes HTML code,server script code (Vbscript, JScript, PHP), clientscript code (Vbscript, Jscript, Javascript).– pt, ASP and PHP source code
  • 8. 8WSE 2002, Montreal, Canada2) Dynamic Analysis of the WA- Recover of additional information about itscomponents and inter-relationships.<%page1=“a.html”page2=“b.html”param=Request.Form(“parameter”)x=Month(Now)If x>0 thenresponse.write(“<a href=“+ page1+”?par=”+param+”>Go to page A </A>”)elseresponse.write(“<a href=“+ page2+”?par=”+param+”>Go to page B</A>”)end if%>Example:links between thispage and a.html andb.html
  • 9. 9WSE 2002, Montreal, Canada2) Dynamic Analysis of the WA- After static and dynamic analysis, we have the WebApplication Graph (WAG), where every component isa node (the shape and the color of the node dependon the type) and every edge is a relationship (thecolor depend on the type)
  • 10. 10WSE 2002, Montreal, Canada3) Automatic Clustering of the WA• The algorithm groups components of a WA intomeaningful (highly cohesive) and independent(loosely coupled) clusters• It evaluate the degree of coupling betweeninterconnected components depending on both thetypology and the typology of the connections, andpropose a clustering configuration that includesclusters with high intra-connectivity and low inter-connectivity
  • 11. 11WSE 2002, Montreal, Canada4) Validation of the clustering• Proposed clustering is submitted to a ConceptAssignment Process (CAP) in order to validate them• We distinguish between:- Valid clusters- Invalid clusters- Incomplete clusters- Divisible clusters- Spurious clusters
  • 12. 12WSE 2002, Montreal, Canada5) Abstraction of the UML diagrams– Every functionality retrieved after ConceptAssignment Process is used to reconstruct a usecase diagram
  • 13. 13WSE 2002, Montreal, CanadaExperimenting thereverse engineering approach• The proposed RE approach has been experimentedwith 6 real WAs with different characteristics, andimplemented using ASP, Javascript, PHP, and HTMLtechnologies.• According to Huang and Tilley’s classification threeof them were class 3 applications, two were class 2applications and the last were a class 1 application.
  • 14. 14WSE 2002, Montreal, Canada1) Static Analysis of the WASummary data about the analyzed WasComponent type WA1 WA2 WA3 WA4 WA5 WA6Server page 75 105 21 0 0 0Client Static page 23 38 19 80 45 257Client Built page 74 98 20 0 0 0External web page 0 0 5 2 34 8Client script block 132 225 113 261 4 3Function in Client script block 48 32 60 68 1 4Form 49 100 5 0 25 5Server script block 562 2358 40 0 0 0Function in Server scripts 0 11 0 0 0 0Redirect operation in server blocks 7 0 0 0 0 0Redirect operation in client blocks 0 0 41 0 0 0Anchor to Hypertextual link 45 266 121 162 448 1508
  • 15. 15WSE 2002, Montreal, Canada2) Dynamic Analysis of the WAProblems :•Connections with a dinamically istantiated value•Connections dinamically istantiated•Connections realized in extra-script object (e.g.: javaapplets, flash objects)
  • 16. 16WSE 2002, Montreal, Canada2) Dynamic Analysis of the WADynamically retrieved informationComponenttypeWA1 WA2 WA3 WA4 WA5 WA6Redirectoperation inserver blocks7 0 0 0 0 0Anchor toHypertextualLink0 1 9 0 27 0Submit Form 0 32 0 0 0 0Redirectoperation inclient blocks0 0 27 0 0 0
  • 17. 17WSE 2002, Montreal, Canada2) Dynamic Analysis of the WAWAG: Web Application Graph
  • 18. 18WSE 2002, Montreal, Canada3) Automatic Clustering of the WA• WARE tool automatically selects the optimalclustering of the WA, according to a quality metricbased on the evaluation of the degree of the intra-connectivity of the clusters and of the degree of inter-connectivity.ComponenttypeWA1 WA2 WA3 WA4 WA5 WA6Number ofClusters48 101 31 58 31 122Average #Pages perClusters3,58 2,41 2,03 1,55 1,45 2,17
  • 19. 19WSE 2002, Montreal, Canada3) Automatic Clustering of the WAThe clusteredgraph of the WA
  • 20. 20WSE 2002, Montreal, Canada3) Automatic Clustering of the WAProblems:• Presence of many navigation links, such asback links and cross links. These links are notrepresentative of semantic relationshipsamong the pages (e.g.: links associated withnavigation bars)
  • 21. 21WSE 2002, Montreal, Canada4) Validation of the clusteringWA1 WA2 WA3 WA4 WA5 WA6Number of initial clusters 49 101 27 49 31 115Number of spurious clusters 0 0 1 1 0 0Number of split clusters 0 0 2 0 5 12Number of incomplete clusters 8 15 3 0 0 0Number of accepted clusters 41 86 21 48 26 103Number of new clusters obtainedfrom the spurious ones0 0 1 2 0 0Number of new clusters obtainedfrom the subdivided ones0 0 5 0 13 31Number of new clusters obtainedby merging incomplete clusters3 7 1 0 0 0Number of final clusters 44 93 28 50 39 134
  • 22. 22WSE 2002, Montreal, Canada5) Abstraction of the UML diagramsWA1 WA2 WA3 WA4 WA5 WA6Clusters thatrealise a use case31 55 19 20 23 121Clustersimplementingcoordinator/home / menupage12 13 2 11 12 16IsolatedClusters0 9 7 19 4 0ClustersimplementingUtility Modules1 16 0 0 0 0Result of the Concept Assignment Process
  • 23. 23WSE 2002, Montreal, Canada5) Abstraction of the UML diagramsAn excerpt ofthe recovereduse case model
  • 24. 24WSE 2002, Montreal, CanadaDiscussion and lessons learned• Dynamic analisys is time-consuming and expensive,since it cannot be completely automated.In order to reduce the effort devoted tostatic/dynamic analysis, programmers should try tointroduce explicit (static) links in the code each timeit is possible
  • 25. 25WSE 2002, Montreal, CanadaDiscussion and lessons learned.√ Links between this page and a.html and b.htmlare retrieved with static analysis.×The value of the parameter can be retrieved onlywith a multi-page dynamic analysis<%param=Request.Form(“parameter”)x=Month(Now)If x>0 then %><A href=a.html?par=<%=param%> >Go to page A</A><% else %><A href=b.html?par=<%=param%> > Go to page B</A><% end if %>………..(a)
  • 26. 26WSE 2002, Montreal, Canada<%page1=“a.html”page2=“b.html”param=Request.Form(“parameter”)x=Month(Now)If x>0 thenresponse.write(“<a href=“+ page1+”?par=”+param+”>Go to page A </A>”)elseresponse.write(“<a href=“+ page2+”?par=”+param+”>Go to page B</A>”)end if%>Discussion and lessons learned.×Links aren’t retrieved with static analysis.×Their value can be retrieved with a (simple) data flowanalysis
  • 27. 27WSE 2002, Montreal, CanadaDiscussion and lessons learned.……….<%‘Read from a database the value to assign to page1 (i.e. a.html)’‘Read from a database the value to assign to page2 (i.e. b.html)’…………param=Request.Form(“parameter”)x=Month(Now)If x>6 thenresponse.write(“<a href=“+page1+”?par=”+param+”>Go to page A </A>”)elseresponse.write(“<a href=“+page2+”?par=”+param+”> Go to page B</A>”)end if%>(c)×Links aren’t retrieved with static analysis.×The value of the link can be retrieved only with a data flowanalysis, comprehending to database
  • 28. 28WSE 2002, Montreal, CanadaDiscussion and lessons learned.•Some WA have a lot of navigation links, such as backlinks and cross links, and they have no semantic mean•Use of frames reduces the number ofnavigation links•Semantic of the link can be described with the‘name’ attribute<title> Argument B </title>…<a name=crossA href=“argumentA.html> Argument A </a><a href=“argumentB1.html> Argument B.1 </a><a href=“argumentB2.html> Argument B.2 </a><a name=crossC href=“argumentC.html> Argument C </a><a name=backHome href=“index.html> Home Page </a>
  • 29. 29WSE 2002, Montreal, CanadaDiscussion and lessons learned.•The validation of the cluster represent a more expensivestep of the RE process: we have to examine all the page ofthe cluster and their execution. So, this phase can be quiteexpensive if the clusterization has a low affidability•Mirror the conceptual structure of theapplication into the directory structure of the filesystem, by locating groups of functionally relatedfiles into the same directory
  • 30. 30WSE 2002, Montreal, CanadaDiscussion and lessons learned.•Employ an internal documentation standard inorder to annotate each main component of theWA<%@ Language=VBScript %><HTML><HEAD><TITLE> check </TITLE><META NAME="Purpose" CONTENT="This page checks Login and Password of a Teacher,then it redirects to Teacher Home Page"><META NAME = "Incoming Links from Pages:" CONTENT = "/autenticazionedocente.html"><META NAME = "Outgoing Links to Pages:" CONTENT = "/autenticazionedocente.html,/areadocente.html"><META NAME="Input Parameters" CONTENT="login,password"><META NAME="Output Parameters" CONTENT=""><META NAME = "Session Variables" CONTENT = "loginOK, matricola"><META NAME="Included Modules" CONTENT="login,password"><META NAME="Database" CONTENT="../basedatisito.mdb"><META NAME="Images" CONTENT="bgmain.gif"></HEAD>...
  • 31. 31WSE 2002, Montreal, CanadaConclusions• This paper presented an approach for ReverseEngineering Web Applications, and illustrated theresults of an experiment carried out to assess whichcharacteristics of a WA mostly affect itscomprehensibility• Lessons learned: the programmers did not abuse themechanisms offered for obtaining dynamic behavior.
  • 32. 32WSE 2002, Montreal, CanadaFuture work• More rules to improve quality of WA• More powerful tools to automate dynamic analysisand concept assignment process• Experimenting the reverse engineering approach toother case studies in order to validate and improvethe methodology

×