SlideShare a Scribd company logo
Comprehending Web Applications
       by a Clustering Based Approach


                       Anna Rita Fasolino
      G. A. Di Lucca, F. Pace, P. Tramontana, U. De Carlini

                      Dipartimento di Informatica e Sistemistica
                      University of Naples Federico II, Italy



IWPC 2002, Paris, France
                                                    1
Web Applications (WA):
                   problems and open issues

  • The pressing market demand of web applications
        – WAs developed in very short time, with no respect of
          software engineering principles


  • The continuously changing needs of the evolving
    application domain
        – WAs frequently and rapidly modified with ad hoc
          approaches, causing low quality software, disordered
          architecture and inadequate and incomplete documentation

  • The growing complexity of WA technologies
        – From static web sites, to sites providing client-side
          interaction, to web applications with dynamic content
IWPC 2002, Paris, France
                                                       2
Managing existing Web Applications

  • Due to the large number of employed technologies,
    understanding, maintaining and evolving a dynamic
    application is a complex task …

  • Reverse Engineering methods and techniques have
    been 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 (use
          cases, sequence and class diagrams)
        – …

IWPC 2002, Paris, France
                                                    3
Current approaches for Web Application
              reverse engineering

  • Based on graphical representations of the web
    application
        – Valuable approach for analyzing relatively small
          applications but…
        – Less useful for coping with large scale applications.

  • A possible solution:
        – Factoring the graphical representation into smaller cohesive
          parts using Clustering techniques.
  • An open issue:
        – Adapting traditional Clustering approaches to the WA area.



IWPC 2002, Paris, France
                                                         4
Applying traditional Clustering to the WAs

   • Approaches based on file name analysis
        – Ineffective with applications whose source code has been
          automatically generated or written without any coherent file
          name convention

   • Approaches based on directory file analysis
        – Grounded on the hypothesis that the directory organization
          mirrors the functional one, but …

   • Pattern-driven clustering approaches
        – Requiring the identification of common structures in web
          applications



IWPC 2002, Paris, France
                                                       5
Applying traditional Clustering to the WAs

   • Approaches based on dependence, or dominance
     graphs
        – Requiring acyclic interconnection graphs! Unapplicable
          because of backward links towards home/ index pages


   • Approaches exploiting quality measures of a
     clustering
        – Optimal clustering is obtained by searching in a space of
          possible graph partitioning. What kind of WA graph should
          be considered? And what quality measure?




IWPC 2002, Paris, France
                                                      6
A new method for clustering WAs


  • Goal: Grouping software components of the WA into
    meaningful (highly cohesive) and independent
    (loosely coupled) clusters.

  • Three questions have been addressed:
        – Definition of a model of a WA representing relevant
          components and relationships.
        – Definition of a metric for expressing the degree of coupling
          of interconnected components.
        – Selection of a clustering algorithm.


IWPC 2002, Paris, France
                                                        7
1. The conceptual model of a WA
                                                                          0..n                    redirect
                                                  link                    Web Page        0..n
               Client Module                                                                          0..n
                                                                   0..n

                        0..n    include                                                                             include


                                                                                                             0..n
                                               0..n
                                              Client Page                                            Server Page
                                                                   0..1      build         0..1                        0..n

                                                         0..n                                                0..n

                                                                                 submit
                   Web Object   0..n




                                          Client Page                                            Load in Frame
                                          with Frame
                                                            0..n




  • Components: Client pages, server pages, client page with frames,
    client modules, web objects.
  • Relationships: Link, submit, redirect, build, load_in_frame, include.
  • Each WA will be modeled by a WAG (WA Connection Graph).
IWPC 2002, Paris, France
                                                                                                                              8
2. A measure of coupling between WA
                  components

  • Heuristic approach:
        – Coupling between two nodes in the WAG will depend both
          on typology and topology of the edges.
        – Two different weigthing strategies.

  • Typology:
        – Different weigths will be assigned with build, link, redirect,
          and submit edges.
             • Build: the greatest weight.
             • Redirect: greater weight than Link edges.
             • Submit : greater weight than Link and Redirect edges.
             • wRL = wR / wL AND wSL = wS / wL AND 1< wRL < wSL.


IWPC 2002, Paris, France
                                                                   9
A measure of coupling between WA
                   components
 • Topology:
       – The degree of coupling of two nodes A and B is considered
         stronger when A uniquely reaches B, than when A reaches
         both B and other nodes.
       – A new weighting strategy:
            • Edges from a node will be weighted (w OUT) according to the fan-
              out of the node (greater the fan-out, less the weight).
            • Edges towards a node will be weighted (w IN) according to the
              fan-in of the node (greater the fan-in, less the weight).
 • The coupling measure
                      CA,B= CAB + CBA

                Depending on weighted edges      Depending on weighted edges
                       from A to B                      from B to A

IWPC 2002, Paris, France
                                                              10
3. The clustering algorithm …

 • Agglomerative hierarchical clustering algorithm:
       – Iteratively gathers the graph nodes into new larger clusters,
         starting from an initial clustering with each cluster including a
         single WA component.


                                                FINAL CLUSTERING




                                                  INITIAL CLUSTERING



IWPC 2002, Paris, France
                                                           11
Four clustering rules


  • At each iteration, a new clustering is obtained by applying four
    clustering rules
             • Rule 1: the cluster containing a built client page will be merged with
               the cluster containing the server page building the former page;
             • Rule 2: if and only if all the pages referenced by the <frame> tags of a
               client page with frame belong to the same cluster, the cluster including
               the page with frame will be merged with the cluster including the
               referenced pages;
             • Rule 3: if and only if all the client pages (server pages) including a
               same client module (server page) belong to the same cluster, the
               cluster comprising the former pages will be merged with the cluster
               including the client module (server page);
             • Rule 4: the pair of clusters whose coupling value is the maximum one
               will be gathered into a new cluster.



IWPC 2002, Paris, France
                                                                    12
The clustering algorithm in PDL
  1.    begin with n clusters each containing one WA component;
  2.    define the wL, wRL and wSL values;
  3. for each cluster containing a built client page component, apply rule R1;
  4. while (there is at least a pair of connected clusters)
  do
     for each cluster containing a client page with frame component, apply
     rule R2;
     for each cluster containing a client module or an included server page
     component, apply rule R3;
     for     each    cluster    c,     and    for    each   x,   compute
          wx (c) and wx (c);
            OUT        IN


       for each pair of clusters A and B, compute the CA,B coupling between
       them;
       apply rule R4;
  od

IWPC 2002, Paris, France
                                                          13
How can the hierarchy of clustering be
                    pruned?

  • An approach based on a quality metric.

  • A good clustering will include clusters with high intra-
    connectivity and low inter-connectivity.
     – intra-connectivity expresses the degree of cohesion between
       items of a same cluster.
             • a weighted mean of a cluster inner edges (values in [0, 1])
        – inter-connectivity expresses the degree of coupling between
          items of two different clusters.
             • a weighted mean of edges between clusters (values in [0, 1])
  • The Quality of a Clustering metric QoC :
                QoC= IntraConnectivity – InterConnectivity   (values in [-1, 1])


IWPC 2002, Paris, France
                                                              14
The choice of the hierarchy cut-heigth


  • The QoC determines the quality of a clustering as the
    trade-off between inter-connectivity and intra-
    connectivity.
        – It rewards the creation of highly cohesive clusters and
          avoids excessive coupling between clusters.


  • The clustering exihibiting the maximum QoC is a
    candidate to implement the best partition of the WA
    components.



IWPC 2002, Paris, France
                                                        15
Using clustering during WA
                  comprehension processes

• A structured approach:
    – Static analysis of the WA and production of the WA Connection
      Graph;
    – Execute clustering;
    – Find the Cmax clustering with the maximum QoC value;
    – Submit the Cmax clustering to a Concept Assignment Process (CAP).


• An integrated tool platform supporting the process:
    – The Reverse engineering WARE tool for :
         • Executing Static Analysis of the WA and producing the WAG
         • Automatic clustering and Search for the best clustering
         • Supporting the software engineer during the CAP


IWPC 2002, Paris, France
                                                         16
A validation experiment

• Goal of the experiment:
    – Assessing the effectiveness of the clustering approach in
      supporting WA comprehension.

• Experimental procedure:
    – Several WAs were analyzed with the clustering technique.
    – Software engineers (unfamiliar with the WAs) carried out the CAP,
      and distinguished Valid from Invalid clusters.
    – Valid clusters: whose items actually implemented one function.
    – Invalid clusters were classified as spurious, divisible, or
      incomplete:
         • Spurious (whose items show low cohesion degree)
         • Divisible (whose items can be splitted into smaller cohesive clusters)
         • Incomplete (not including all necessary items implementing a function)

 IWPC 2002, Paris, France
                                                             17
A case study

  • A WA for managing undergraduate course activities:

        – Providing course information, allowing student registration to
          the course, or exam sessions, teaching material download or
          upload, managing the teacher course agenda.
        – Implemented using HTML, ASP, Vbscript, Javascript
          technologies, with MS Access database.
        – Composed of 107 source files arranged in one directory
          (size of about 500 Kbytes).
        – Development documentation included UML use case
          diagrams and textual description of the WA functions.



IWPC 2002, Paris, France
                                                        18
Results from the Static analysis of the WA

  • The inventory produced by the WARE tool:

                           Component type           # Detected
                       Server page                     76
                       Client Static page              23
                       Client Built page               75
                       Submit Operation                49
                       Anchor (Hypertextual link)      45
                       Redirect operation               8
                       Include operation               57
                       Load in Frame operation          4

IWPC 2002, Paris, France
                                                                 19
The WA Connection Graph


174 nodes




IWPC 2002, Paris, France
                                       20
The WA clustering proposed by the tool


50 cluster nodes




            The clustering exihibiting the maximum QoC

IWPC 2002, Paris, France
                                                         21
Results from the CAP

  • The source code of the proposed clusters was analyzed in order to
    associate each cluster with a description of the implemented
    function:
        – 44 valid clusters
        – 6 incomplete clusters
        – 3 pairs of clusters could be gathered together into three new clusters
  • Final result: 47 valid clusters
  • Cluster descriptions were compared against the development
    documentation:
        – Each valid cluster matched with a use case!


  •    Effectiveness= # Valid Clusters/ #Proposed clusters= 94%


IWPC 2002, Paris, France
                                                              22
Lesson learned

•   The problem of the cut-heigth with hierarchical clustering:
     – The QoC metric suggests a candidate clustering to be analyzed. For a
       given QoC, the maximum coupling value C° represents the cut-heigth.
•   In order to improve the effectiveness of the approach, further
    clustering from the hierarchy can be taken into account.
     – The clustering with a cut-heigth greater than C° is likely to include
       smaller clusters.
     – The clustering with a cut-heigth less than C° is likely to include larger
       clusters.
•   A heuristic approach:
     – Use a cut-heigth greater than C° if the considered clustering massively
       includes spurious clusters.
     – Use a cut-heigth less than C° if the considered clustering massively
       includes incomplete clusters.

IWPC 2002, Paris, France
                                                               23
Conclusions

 • The inceasing diffusion and increasing complexity of
   WAs oblige reseachers to seach for effective Reverse
   engineering techniques involving WAs.
 • Clustering approaches can be used to collapse the
   size of a WA and carry out comprehension processes
   more effectively.
 • A clustering approach exploiting a coupling measure
   of WA components that considers both the typology
   and the topology of connections has been proposed
   and preliminarly validated.


IWPC 2002, Paris, France
                                           24
Future work


  • A finer model of dependencies between WA
    components will be investigated.

  • The data flow between components will contribute to
    the evaluation of the coupling.

  • Experimenting the clustering approach in the context
    of WA remodularization and reengineering.



IWPC 2002, Paris, France
                                            25

More Related Content

PPTX
Lecture 1 graphical models
Duy Tung Pham
 
PPT
Reverse Engineering Finite State Machines from Rich Internet Applications
Porfirio Tramontana
 
PPT
Comprehending Ajax Web Applications by the DynaRIA Tool
Porfirio Tramontana
 
PPT
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Porfirio Tramontana
 
PDF
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Porfirio Tramontana
 
PDF
Techniques and Tools for Rich Internet Applications Testing
Porfirio Tramontana
 
PDF
3D Printing for Surgical Innovation: A Primer
Nigel Parsad
 
PPT
DynaRIA: a Tool for Ajax Web Application Comprehension
Porfirio Tramontana
 
Lecture 1 graphical models
Duy Tung Pham
 
Reverse Engineering Finite State Machines from Rich Internet Applications
Porfirio Tramontana
 
Comprehending Ajax Web Applications by the DynaRIA Tool
Porfirio Tramontana
 
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Porfirio Tramontana
 
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Porfirio Tramontana
 
Techniques and Tools for Rich Internet Applications Testing
Porfirio Tramontana
 
3D Printing for Surgical Innovation: A Primer
Nigel Parsad
 
DynaRIA: a Tool for Ajax Web Application Comprehension
Porfirio Tramontana
 

Viewers also liked (8)

PPT
Recovering Interaction Design Patterns in Web Applications
Porfirio Tramontana
 
PPT
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Porfirio Tramontana
 
PPT
Web Pages Classification using Concept Analysis
Porfirio Tramontana
 
PPT
WARE: a tool for the Reverse Engineering of Web Applications
Porfirio Tramontana
 
PDF
Web Application Testing in Fifteen Years of WSE
Porfirio Tramontana
 
PDF
A Toolset for GUI Testing of Android Applications
Porfirio Tramontana
 
PPT
Improving Usability of Web Pages for Blind
Porfirio Tramontana
 
PDF
Standard 3D medical images and printing
Young Moon
 
Recovering Interaction Design Patterns in Web Applications
Porfirio Tramontana
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Porfirio Tramontana
 
Web Pages Classification using Concept Analysis
Porfirio Tramontana
 
WARE: a tool for the Reverse Engineering of Web Applications
Porfirio Tramontana
 
Web Application Testing in Fifteen Years of WSE
Porfirio Tramontana
 
A Toolset for GUI Testing of Android Applications
Porfirio Tramontana
 
Improving Usability of Web Pages for Blind
Porfirio Tramontana
 
Standard 3D medical images and printing
Young Moon
 
Ad

Similar to Comprehending Web Applications by a Clustering Based Approach (20)

PDF
UCL Ph.D. Confirmation 2018
Pradeeban Kathiravelu, Ph.D.
 
PPTX
Mini-Training Owin Katana
Betclic Everest Group Tech Team
 
DOC
Mini Project- Implementation & Evaluation Of Wireless La Ns
University of Hertfordshire, School of Electronic Communications and Electrical Engineering
 
PDF
Modernizing the monolithic architecture to container based architecture apaco...
Vinay Kumar
 
PPT
FlowN vs FlowVisor: Scalable Network Virtualization in SDN
Hao Jiang
 
PDF
IRJET- Extension to Visual Information Narrator using Neural Network
IRJET Journal
 
PDF
Nuage Networks, A Policy Driven Approach to SDN - Interop Tokyo 2014
Scott Sneddon
 
PDF
Optimising Service Deployment and Infrastructure Resource Configuration
RECAP Project
 
PPTX
AWT Orientation advanced topics and the us e of studying it
BKReddy3
 
PPT
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
PDF
Recovering a Business Object Model from Web Applications
Porfirio Tramontana
 
PDF
Java Microservices HJUG
Lana Kalashnyk
 
PDF
The Network Revolution, John Zannos, Canonical
Alan Quayle
 
PDF
Networked 3-D Virtual Collaboration in Science and Education: Towards 'Web 3....
Distinguished Lecturer Series - Leon The Mathematician
 
PDF
Scheduling wireless virtual networks functions
redpel dot com
 
PPTX
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify Community
 
PDF
Bexar networkdesign
Open Stack
 
DOC
10265 developing data access solutions with microsoft visual studio 2010
bestip
 
PPTX
Cloud Architecture and protocols ipv6 addressing.pptx
dhruvisrishwal06
 
PPTX
Kumar ppts
KUMARPUNABAKA
 
UCL Ph.D. Confirmation 2018
Pradeeban Kathiravelu, Ph.D.
 
Mini-Training Owin Katana
Betclic Everest Group Tech Team
 
Mini Project- Implementation & Evaluation Of Wireless La Ns
University of Hertfordshire, School of Electronic Communications and Electrical Engineering
 
Modernizing the monolithic architecture to container based architecture apaco...
Vinay Kumar
 
FlowN vs FlowVisor: Scalable Network Virtualization in SDN
Hao Jiang
 
IRJET- Extension to Visual Information Narrator using Neural Network
IRJET Journal
 
Nuage Networks, A Policy Driven Approach to SDN - Interop Tokyo 2014
Scott Sneddon
 
Optimising Service Deployment and Infrastructure Resource Configuration
RECAP Project
 
AWT Orientation advanced topics and the us e of studying it
BKReddy3
 
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
Recovering a Business Object Model from Web Applications
Porfirio Tramontana
 
Java Microservices HJUG
Lana Kalashnyk
 
The Network Revolution, John Zannos, Canonical
Alan Quayle
 
Networked 3-D Virtual Collaboration in Science and Education: Towards 'Web 3....
Distinguished Lecturer Series - Leon The Mathematician
 
Scheduling wireless virtual networks functions
redpel dot com
 
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify Community
 
Bexar networkdesign
Open Stack
 
10265 developing data access solutions with microsoft visual studio 2010
bestip
 
Cloud Architecture and protocols ipv6 addressing.pptx
dhruvisrishwal06
 
Kumar ppts
KUMARPUNABAKA
 
Ad

More from Porfirio Tramontana (18)

PPTX
Testing Robot Challenge: A Serious Game for Testing Learning
Porfirio Tramontana
 
PPTX
Test Smells Learning by a Gamification Approach
Porfirio Tramontana
 
PPTX
Automatic Assessment of Architectural Anti-patterns and Code Smells in Studen...
Porfirio Tramontana
 
PPTX
State of the practice in Software Testing Teaching in Four European Countries
Porfirio Tramontana
 
PDF
An Approach for Model Based Testing of Augmented Reality Applications.pdf
Porfirio Tramontana
 
PDF
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Porfirio Tramontana
 
PDF
Techniques and Tools for Mobile Testing Automation
Porfirio Tramontana
 
PPTX
A technique for parallel gui testing of android applications
Porfirio Tramontana
 
PDF
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Porfirio Tramontana
 
PPT
Reverse Engineering Web Applications
Porfirio Tramontana
 
PPT
A GUI Crawling-based Technique for Android Mobile Application Testing
Porfirio Tramontana
 
PPTX
Considering Context Events in Event-Based Testing of Mobile Applications
Porfirio Tramontana
 
PPT
Using GUI Ripping for Automated Testing of Android Apps
Porfirio Tramontana
 
PPTX
Rich Internet Application Testing Using Execution Trace Data
Porfirio Tramontana
 
PDF
An AHP-based Framework for Quality and Security Evaluation
Porfirio Tramontana
 
PPT
Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...
Porfirio Tramontana
 
PPT
A policy-based evaluation framework for Quality and Security in Service Orien...
Porfirio Tramontana
 
PPT
Turning Web Applications into Web Services by Wrapping Techniques
Porfirio Tramontana
 
Testing Robot Challenge: A Serious Game for Testing Learning
Porfirio Tramontana
 
Test Smells Learning by a Gamification Approach
Porfirio Tramontana
 
Automatic Assessment of Architectural Anti-patterns and Code Smells in Studen...
Porfirio Tramontana
 
State of the practice in Software Testing Teaching in Four European Countries
Porfirio Tramontana
 
An Approach for Model Based Testing of Augmented Reality Applications.pdf
Porfirio Tramontana
 
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Porfirio Tramontana
 
Techniques and Tools for Mobile Testing Automation
Porfirio Tramontana
 
A technique for parallel gui testing of android applications
Porfirio Tramontana
 
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Porfirio Tramontana
 
Reverse Engineering Web Applications
Porfirio Tramontana
 
A GUI Crawling-based Technique for Android Mobile Application Testing
Porfirio Tramontana
 
Considering Context Events in Event-Based Testing of Mobile Applications
Porfirio Tramontana
 
Using GUI Ripping for Automated Testing of Android Apps
Porfirio Tramontana
 
Rich Internet Application Testing Using Execution Trace Data
Porfirio Tramontana
 
An AHP-based Framework for Quality and Security Evaluation
Porfirio Tramontana
 
Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...
Porfirio Tramontana
 
A policy-based evaluation framework for Quality and Security in Service Orien...
Porfirio Tramontana
 
Turning Web Applications into Web Services by Wrapping Techniques
Porfirio Tramontana
 

Recently uploaded (20)

PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
Chapter 1 Introduction to CV and IP Lecture Note.pdf
Getnet Tigabie Askale -(GM)
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
This slide provides an overview Technology
mineshkharadi333
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Chapter 1 Introduction to CV and IP Lecture Note.pdf
Getnet Tigabie Askale -(GM)
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 

Comprehending Web Applications by a Clustering Based Approach

  • 1. Comprehending Web Applications by a Clustering Based Approach Anna Rita Fasolino G. A. Di Lucca, F. Pace, P. Tramontana, U. De Carlini Dipartimento di Informatica e Sistemistica University of Naples Federico II, Italy IWPC 2002, Paris, France 1
  • 2. Web Applications (WA): problems and open issues • The pressing market demand of web applications – WAs developed in very short time, with no respect of software engineering principles • The continuously changing needs of the evolving application domain – WAs frequently and rapidly modified with ad hoc approaches, causing low quality software, disordered architecture and inadequate and incomplete documentation • The growing complexity of WA technologies – From static web sites, to sites providing client-side interaction, to web applications with dynamic content IWPC 2002, Paris, France 2
  • 3. Managing existing Web Applications • Due to the large number of employed technologies, understanding, maintaining and evolving a dynamic application is a complex task … • Reverse Engineering methods and techniques have been 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 (use cases, sequence and class diagrams) – … IWPC 2002, Paris, France 3
  • 4. Current approaches for Web Application reverse engineering • Based on graphical representations of the web application – Valuable approach for analyzing relatively small applications but… – Less useful for coping with large scale applications. • A possible solution: – Factoring the graphical representation into smaller cohesive parts using Clustering techniques. • An open issue: – Adapting traditional Clustering approaches to the WA area. IWPC 2002, Paris, France 4
  • 5. Applying traditional Clustering to the WAs • Approaches based on file name analysis – Ineffective with applications whose source code has been automatically generated or written without any coherent file name convention • Approaches based on directory file analysis – Grounded on the hypothesis that the directory organization mirrors the functional one, but … • Pattern-driven clustering approaches – Requiring the identification of common structures in web applications IWPC 2002, Paris, France 5
  • 6. Applying traditional Clustering to the WAs • Approaches based on dependence, or dominance graphs – Requiring acyclic interconnection graphs! Unapplicable because of backward links towards home/ index pages • Approaches exploiting quality measures of a clustering – Optimal clustering is obtained by searching in a space of possible graph partitioning. What kind of WA graph should be considered? And what quality measure? IWPC 2002, Paris, France 6
  • 7. A new method for clustering WAs • Goal: Grouping software components of the WA into meaningful (highly cohesive) and independent (loosely coupled) clusters. • Three questions have been addressed: – Definition of a model of a WA representing relevant components and relationships. – Definition of a metric for expressing the degree of coupling of interconnected components. – Selection of a clustering algorithm. IWPC 2002, Paris, France 7
  • 8. 1. The conceptual model of a WA 0..n redirect link Web Page 0..n Client Module 0..n 0..n 0..n include include 0..n 0..n Client Page Server Page 0..1 build 0..1 0..n 0..n 0..n submit Web Object 0..n Client Page Load in Frame with Frame 0..n • Components: Client pages, server pages, client page with frames, client modules, web objects. • Relationships: Link, submit, redirect, build, load_in_frame, include. • Each WA will be modeled by a WAG (WA Connection Graph). IWPC 2002, Paris, France 8
  • 9. 2. A measure of coupling between WA components • Heuristic approach: – Coupling between two nodes in the WAG will depend both on typology and topology of the edges. – Two different weigthing strategies. • Typology: – Different weigths will be assigned with build, link, redirect, and submit edges. • Build: the greatest weight. • Redirect: greater weight than Link edges. • Submit : greater weight than Link and Redirect edges. • wRL = wR / wL AND wSL = wS / wL AND 1< wRL < wSL. IWPC 2002, Paris, France 9
  • 10. A measure of coupling between WA components • Topology: – The degree of coupling of two nodes A and B is considered stronger when A uniquely reaches B, than when A reaches both B and other nodes. – A new weighting strategy: • Edges from a node will be weighted (w OUT) according to the fan- out of the node (greater the fan-out, less the weight). • Edges towards a node will be weighted (w IN) according to the fan-in of the node (greater the fan-in, less the weight). • The coupling measure CA,B= CAB + CBA Depending on weighted edges Depending on weighted edges from A to B from B to A IWPC 2002, Paris, France 10
  • 11. 3. The clustering algorithm … • Agglomerative hierarchical clustering algorithm: – Iteratively gathers the graph nodes into new larger clusters, starting from an initial clustering with each cluster including a single WA component. FINAL CLUSTERING INITIAL CLUSTERING IWPC 2002, Paris, France 11
  • 12. Four clustering rules • At each iteration, a new clustering is obtained by applying four clustering rules • Rule 1: the cluster containing a built client page will be merged with the cluster containing the server page building the former page; • Rule 2: if and only if all the pages referenced by the <frame> tags of a client page with frame belong to the same cluster, the cluster including the page with frame will be merged with the cluster including the referenced pages; • Rule 3: if and only if all the client pages (server pages) including a same client module (server page) belong to the same cluster, the cluster comprising the former pages will be merged with the cluster including the client module (server page); • Rule 4: the pair of clusters whose coupling value is the maximum one will be gathered into a new cluster. IWPC 2002, Paris, France 12
  • 13. The clustering algorithm in PDL 1. begin with n clusters each containing one WA component; 2. define the wL, wRL and wSL values; 3. for each cluster containing a built client page component, apply rule R1; 4. while (there is at least a pair of connected clusters) do for each cluster containing a client page with frame component, apply rule R2; for each cluster containing a client module or an included server page component, apply rule R3; for each cluster c, and for each x, compute wx (c) and wx (c); OUT IN for each pair of clusters A and B, compute the CA,B coupling between them; apply rule R4; od IWPC 2002, Paris, France 13
  • 14. How can the hierarchy of clustering be pruned? • An approach based on a quality metric. • A good clustering will include clusters with high intra- connectivity and low inter-connectivity. – intra-connectivity expresses the degree of cohesion between items of a same cluster. • a weighted mean of a cluster inner edges (values in [0, 1]) – inter-connectivity expresses the degree of coupling between items of two different clusters. • a weighted mean of edges between clusters (values in [0, 1]) • The Quality of a Clustering metric QoC : QoC= IntraConnectivity – InterConnectivity (values in [-1, 1]) IWPC 2002, Paris, France 14
  • 15. The choice of the hierarchy cut-heigth • The QoC determines the quality of a clustering as the trade-off between inter-connectivity and intra- connectivity. – It rewards the creation of highly cohesive clusters and avoids excessive coupling between clusters. • The clustering exihibiting the maximum QoC is a candidate to implement the best partition of the WA components. IWPC 2002, Paris, France 15
  • 16. Using clustering during WA comprehension processes • A structured approach: – Static analysis of the WA and production of the WA Connection Graph; – Execute clustering; – Find the Cmax clustering with the maximum QoC value; – Submit the Cmax clustering to a Concept Assignment Process (CAP). • An integrated tool platform supporting the process: – The Reverse engineering WARE tool for : • Executing Static Analysis of the WA and producing the WAG • Automatic clustering and Search for the best clustering • Supporting the software engineer during the CAP IWPC 2002, Paris, France 16
  • 17. A validation experiment • Goal of the experiment: – Assessing the effectiveness of the clustering approach in supporting WA comprehension. • Experimental procedure: – Several WAs were analyzed with the clustering technique. – Software engineers (unfamiliar with the WAs) carried out the CAP, and distinguished Valid from Invalid clusters. – Valid clusters: whose items actually implemented one function. – Invalid clusters were classified as spurious, divisible, or incomplete: • Spurious (whose items show low cohesion degree) • Divisible (whose items can be splitted into smaller cohesive clusters) • Incomplete (not including all necessary items implementing a function) IWPC 2002, Paris, France 17
  • 18. A case study • A WA for managing undergraduate course activities: – Providing course information, allowing student registration to the course, or exam sessions, teaching material download or upload, managing the teacher course agenda. – Implemented using HTML, ASP, Vbscript, Javascript technologies, with MS Access database. – Composed of 107 source files arranged in one directory (size of about 500 Kbytes). – Development documentation included UML use case diagrams and textual description of the WA functions. IWPC 2002, Paris, France 18
  • 19. Results from the Static analysis of the WA • The inventory produced by the WARE tool: Component type # Detected Server page 76 Client Static page 23 Client Built page 75 Submit Operation 49 Anchor (Hypertextual link) 45 Redirect operation 8 Include operation 57 Load in Frame operation 4 IWPC 2002, Paris, France 19
  • 20. The WA Connection Graph 174 nodes IWPC 2002, Paris, France 20
  • 21. The WA clustering proposed by the tool 50 cluster nodes The clustering exihibiting the maximum QoC IWPC 2002, Paris, France 21
  • 22. Results from the CAP • The source code of the proposed clusters was analyzed in order to associate each cluster with a description of the implemented function: – 44 valid clusters – 6 incomplete clusters – 3 pairs of clusters could be gathered together into three new clusters • Final result: 47 valid clusters • Cluster descriptions were compared against the development documentation: – Each valid cluster matched with a use case! • Effectiveness= # Valid Clusters/ #Proposed clusters= 94% IWPC 2002, Paris, France 22
  • 23. Lesson learned • The problem of the cut-heigth with hierarchical clustering: – The QoC metric suggests a candidate clustering to be analyzed. For a given QoC, the maximum coupling value C° represents the cut-heigth. • In order to improve the effectiveness of the approach, further clustering from the hierarchy can be taken into account. – The clustering with a cut-heigth greater than C° is likely to include smaller clusters. – The clustering with a cut-heigth less than C° is likely to include larger clusters. • A heuristic approach: – Use a cut-heigth greater than C° if the considered clustering massively includes spurious clusters. – Use a cut-heigth less than C° if the considered clustering massively includes incomplete clusters. IWPC 2002, Paris, France 23
  • 24. Conclusions • The inceasing diffusion and increasing complexity of WAs oblige reseachers to seach for effective Reverse engineering techniques involving WAs. • Clustering approaches can be used to collapse the size of a WA and carry out comprehension processes more effectively. • A clustering approach exploiting a coupling measure of WA components that considers both the typology and the topology of connections has been proposed and preliminarly validated. IWPC 2002, Paris, France 24
  • 25. Future work • A finer model of dependencies between WA components will be investigated. • The data flow between components will contribute to the evaluation of the coupling. • Experimenting the clustering approach in the context of WA remodularization and reengineering. IWPC 2002, Paris, France 25