SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Identifying Reusable
Components in Web
    Applications

           P. Tramontana
     U. De Carlini, A.R. Fasolino
    Dipartimento di Informatica e Sistemistica
       University of Naples Federico II, Italy


               G.A. Di Lucca
RCOST – Research Centre on Software Technology
     University of Sannio, Benevento, Italy
Outline

• Reusability in Web Applications


• Clones


• Clone Analysis Process


• An experiment
Web Applications (WA):
        problems and open issues

• Basic software engineering principles,
such as modularity, encapsulation, or
separation of concerns cannot be realized
with some Web Application
implementation technologies


 Maintaining and evolving these systems
are difficult and expensive tasks.
Web Applications (WA):
           problems and open issues

• HTML language does not encourage the
 information content to be separated from its
 rendering

• Server and Client scripting languages don’t
 encourage separation between Layout,
 Content and Business Rules
Web Applications (WA):
        problems and open issues

• Practice of developing new applications
by cloning existing pieces of code is
frequently adopted


 Web applications provide a valuable
source of reusable software, which can be
used with success to support their
maintenance, reengineering and evolution.
Clone Definition

   Clones: Duplicated or similar portions
    of code in software artifacts

       What kind of portions of code?

       How measure similarity between these
        portions of code?
What kind of portions of code?

Degree of granularity          Type of clone
of a clone
Web Page                       Client Page
                               Server Page
Client Page inner components   Script Block
                               Script Function
                               HTML Form
                               HTML table
Server Page inner              Script Block
components                     Script Function
Comparing source code

•Levenshtein distance:
  Minimum number of insertions, deletions, and
  replacements of elements necessary to make two
  vectors equal

• Euclidean   distance
Distance between portions of code
Technique                    Description


 STH        Strings of HTML tags extracted from client pages are
            compared by the Levenshtein distance.


 CTH        Counts of HTML tags extracted from client pages are
            compared by the Euclidean distance.


 SOA        Strings of ASP built-in objects extracted from server
            pages are compared by the Levenshtein distance.


 AMA        An array of software metrics extracted from ASP
            script blocks in server pages is used to compare
            server pages by the Euclidean distance.
Metrics for AMA
                           Software Metrics
NTC       Total Number of characters per page

NTRC      Total Number of lines of code per page

NTBC      Total Number of ASP code blocks per page

NTSD      Total Number of declarative statements per page

NTSC      Total Number of conditional statements per page

NTSI      Total Number of cyclic statements per page

NTF       Total Number of Functions per page

NTS       Total Number of Subroutines per page

NTOP      Total Number of built-in ASP objects per page

LDBC      Levenshtein distance of ASP code blocks
Phases of Clone Analysis Process

1.   Separation of control and data
     component within Web pages
2.   Clone Detection
3.   Clone Validation
4.   Template Generation
5.   Repository population 
Separation of control and data
              component
• Structure and data component are separated
in HTML portions of code

• ASP block code is transformed removing
blank characters and comments from the line,
and substituting each data element (such as
constants, or identifiers) by a dummy one.

• Consecutive blocks of ASP code will be
merged in a single comprehensive block.
Clone Detection

•Metrics are calculated for each
component

•   Clone analysis techniques are applied

•Clone and near-miss-clone are
automatically detected with the support
of CloneDetector tool
Clone Validation

Clones  (and near-miss-clones) are assessed by an
expert, considering:
•meaningfulness     (does the considered clone
implement a meaningful abstraction in the business
domain, or in the solution domain?)
•completeness (does the clone include all the lines of
code necessary for implementing a valid abstraction?).

Clones  may be discarded, merged or accepted as
reusable components.
Template generation

 For each validated cluster of clones, a Template will
be derived
Repository population
Template   information are stored in a repository,
together with component information

                                                    Template
                                                    1

                                                        1
                                               CloneCluster                             DataComponent
                                                                                            0..*
                                                                                                                      Dummy
                                                                                            1..*

                                                    WebPage                             ControlComponent            follows
                                                                                                                1
                                                                                                            1


                                           Client             Server            HTMLTag                 Statement
                                                                                    *
                                                                                        *
                 PageSubComponent                                              TagAttribute


                                                                     {incomplete}

  Form   Table        Script        Function            Subroutine
Experiment
An  experiment has been carried out, with 4 real web
applications
We used CloneDetector tool to search exact clones
of:
       HTML pages (STH technique)
       client scripts (STH technique)
       functions in client scripts (STH technique)
       forms (STH technique)
       tables (STH technique)
       ASP pages (AMA technique)
       ASP script blocks (AMA technique)
       functions/subroutines in ASP pages (AMA
        technique)
Results
                                        WA1 WA2 WA3 WA4
# HTML pages                             55  23  23    -
# cloned HTML pages                      18   2   8    -
# clusters of cloned HTML pages           3   1   4    -
# scripts in client pages                 3  12  10    -
# cloned client scripts                   3   4   2    -
# cluste rs of cloned client scripts      1   2   1    -
# functions in client pages              12  10  10    -
# cloned client functions                12   4   2    -
# clusters of cloned client functions     4   2   1    -
# forms in client pages                   1   8  10    -
# cloned client forms                     0   2   9    -
# clusters of clo ned client forms        0   1   3    -
# tables in client pages                  7   4   3    -
# cloned client tables                    0   0   0    -
# clusters of cloned client tables        0   0   0    -
# ASP pages                              19  73  37   71
# cloned ASP pages                        2  15   3    2
# clusters of cloned ASP pages            1   6   1    1
# scripts in ASP pages                   75 576 150 5341
# cloned ASP scripts                      4   0  36    0
# clusters of cloned ASP scripts          2   0   3    0
# functions/subroutines in ASP pages      5   0   3  165
# cloned ASP functions/subroutines        0   0   0    9
# clusters of cloned ASP                  0   0   0    3
functions/subroutines
Conclusions

 A clone detection method has been presented
 An experiment has been carried out
 Many cluster of cloned artifact has been detected and
validated
 Some reusable component has been abstracted as
templates


 Reengineering of static pages in a XML/XSL architecture
may be performed
 Reuse of components or pages may be performed

Weitere ähnliche Inhalte

Ähnlich wie Identifying Reusable Components in Web Applications

Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwerskavinilavuG
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction Hitesh-Java
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionPawanMM
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandboxElaine Van Bergen
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaJignesh Aakoliya
 
ASP.NET MVC as the next step in web development
ASP.NET MVC as the next step in web developmentASP.NET MVC as the next step in web development
ASP.NET MVC as the next step in web developmentVolodymyr Voytyshyn
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationabhishek singh
 
Building dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelBuilding dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelEric Shupps
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandboxElaine Van Bergen
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)Igor Talevski
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .NetRichard Banks
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon Web Services Korea
 
PranathiSadhulaAutomationTester
PranathiSadhulaAutomationTesterPranathiSadhulaAutomationTester
PranathiSadhulaAutomationTesterPranathi Sadhula
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net FundamentalsLiquidHub
 
Client control
Client controlClient control
Client controlSireesh K
 

Ähnlich wie Identifying Reusable Components in Web Applications (20)

Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 Introduction
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandbox
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
 
.net Framework
.net Framework.net Framework
.net Framework
 
ASP.NET MVC as the next step in web development
ASP.NET MVC as the next step in web developmentASP.NET MVC as the next step in web development
ASP.NET MVC as the next step in web development
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
 
Building dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelBuilding dynamic applications with the share point client object model
Building dynamic applications with the share point client object model
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandbox
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
PranathiSadhulaAutomationTester
PranathiSadhulaAutomationTesterPranathiSadhulaAutomationTester
PranathiSadhulaAutomationTester
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Client control
Client controlClient control
Client control
 
Angular 9
Angular 9 Angular 9
Angular 9
 

Mehr von Porfirio Tramontana

An Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdfAn Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdfPorfirio Tramontana
 
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Porfirio Tramontana
 
Techniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing AutomationTechniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing AutomationPorfirio Tramontana
 
A technique for parallel gui testing of android applications
A technique for parallel gui testing of android applicationsA technique for parallel gui testing of android applications
A technique for parallel gui testing of android applicationsPorfirio Tramontana
 
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...Porfirio Tramontana
 
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...Porfirio Tramontana
 
Web Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSEWeb Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSEPorfirio Tramontana
 
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...Porfirio Tramontana
 
Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach Porfirio Tramontana
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web ApplicationsPorfirio Tramontana
 
Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications Porfirio Tramontana
 
Improving Usability of Web Pages for Blind
Improving Usability of Web Pages for BlindImproving Usability of Web Pages for Blind
Improving Usability of Web Pages for BlindPorfirio Tramontana
 
Techniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications TestingTechniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications TestingPorfirio Tramontana
 
Comprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA ToolComprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA ToolPorfirio Tramontana
 
A GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application TestingA GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application TestingPorfirio Tramontana
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Porfirio Tramontana
 
Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications Porfirio Tramontana
 
Using GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android AppsUsing GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android AppsPorfirio Tramontana
 
A Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android ApplicationsA Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android ApplicationsPorfirio Tramontana
 
DynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application ComprehensionDynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application ComprehensionPorfirio Tramontana
 

Mehr von Porfirio Tramontana (20)

An Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdfAn Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdf
 
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
 
Techniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing AutomationTechniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing Automation
 
A technique for parallel gui testing of android applications
A technique for parallel gui testing of android applicationsA technique for parallel gui testing of android applications
A technique for parallel gui testing of android applications
 
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
 
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
 
Web Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSEWeb Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSE
 
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
 
Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web Applications
 
Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications
 
Improving Usability of Web Pages for Blind
Improving Usability of Web Pages for BlindImproving Usability of Web Pages for Blind
Improving Usability of Web Pages for Blind
 
Techniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications TestingTechniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications Testing
 
Comprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA ToolComprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA Tool
 
A GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application TestingA GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application Testing
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
 
Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications
 
Using GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android AppsUsing GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android Apps
 
A Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android ApplicationsA Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android Applications
 
DynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application ComprehensionDynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application Comprehension
 

Kürzlich hochgeladen

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Kürzlich hochgeladen (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Identifying Reusable Components in Web Applications

  • 1. Identifying Reusable Components in Web Applications P. Tramontana U. De Carlini, A.R. Fasolino Dipartimento di Informatica e Sistemistica University of Naples Federico II, Italy G.A. Di Lucca RCOST – Research Centre on Software Technology University of Sannio, Benevento, Italy
  • 2. Outline • Reusability in Web Applications • Clones • Clone Analysis Process • An experiment
  • 3. Web Applications (WA): problems and open issues • Basic software engineering principles, such as modularity, encapsulation, or separation of concerns cannot be realized with some Web Application implementation technologies  Maintaining and evolving these systems are difficult and expensive tasks.
  • 4. Web Applications (WA): problems and open issues • HTML language does not encourage the information content to be separated from its rendering • Server and Client scripting languages don’t encourage separation between Layout, Content and Business Rules
  • 5. Web Applications (WA): problems and open issues • Practice of developing new applications by cloning existing pieces of code is frequently adopted  Web applications provide a valuable source of reusable software, which can be used with success to support their maintenance, reengineering and evolution.
  • 6. Clone Definition  Clones: Duplicated or similar portions of code in software artifacts  What kind of portions of code?  How measure similarity between these portions of code?
  • 7. What kind of portions of code? Degree of granularity Type of clone of a clone Web Page Client Page Server Page Client Page inner components Script Block Script Function HTML Form HTML table Server Page inner Script Block components Script Function
  • 8. Comparing source code •Levenshtein distance: Minimum number of insertions, deletions, and replacements of elements necessary to make two vectors equal • Euclidean distance
  • 9. Distance between portions of code Technique Description STH Strings of HTML tags extracted from client pages are compared by the Levenshtein distance. CTH Counts of HTML tags extracted from client pages are compared by the Euclidean distance. SOA Strings of ASP built-in objects extracted from server pages are compared by the Levenshtein distance. AMA An array of software metrics extracted from ASP script blocks in server pages is used to compare server pages by the Euclidean distance.
  • 10. Metrics for AMA   Software Metrics NTC Total Number of characters per page NTRC Total Number of lines of code per page NTBC Total Number of ASP code blocks per page NTSD Total Number of declarative statements per page NTSC Total Number of conditional statements per page NTSI Total Number of cyclic statements per page NTF Total Number of Functions per page NTS Total Number of Subroutines per page NTOP Total Number of built-in ASP objects per page LDBC Levenshtein distance of ASP code blocks
  • 11. Phases of Clone Analysis Process 1. Separation of control and data component within Web pages 2. Clone Detection 3. Clone Validation 4. Template Generation 5. Repository population 
  • 12. Separation of control and data component • Structure and data component are separated in HTML portions of code • ASP block code is transformed removing blank characters and comments from the line, and substituting each data element (such as constants, or identifiers) by a dummy one. • Consecutive blocks of ASP code will be merged in a single comprehensive block.
  • 13. Clone Detection •Metrics are calculated for each component • Clone analysis techniques are applied •Clone and near-miss-clone are automatically detected with the support of CloneDetector tool
  • 14. Clone Validation Clones (and near-miss-clones) are assessed by an expert, considering: •meaningfulness (does the considered clone implement a meaningful abstraction in the business domain, or in the solution domain?) •completeness (does the clone include all the lines of code necessary for implementing a valid abstraction?). Clones may be discarded, merged or accepted as reusable components.
  • 15. Template generation  For each validated cluster of clones, a Template will be derived
  • 16. Repository population Template information are stored in a repository, together with component information Template 1 1 CloneCluster DataComponent 0..* Dummy 1..* WebPage ControlComponent follows 1 1 Client Server HTMLTag Statement * * PageSubComponent TagAttribute {incomplete} Form Table Script Function Subroutine
  • 17. Experiment An experiment has been carried out, with 4 real web applications We used CloneDetector tool to search exact clones of:  HTML pages (STH technique)  client scripts (STH technique)  functions in client scripts (STH technique)  forms (STH technique)  tables (STH technique)  ASP pages (AMA technique)  ASP script blocks (AMA technique)  functions/subroutines in ASP pages (AMA technique)
  • 18. Results WA1 WA2 WA3 WA4 # HTML pages 55 23 23 - # cloned HTML pages 18 2 8 - # clusters of cloned HTML pages 3 1 4 - # scripts in client pages 3 12 10 - # cloned client scripts 3 4 2 - # cluste rs of cloned client scripts 1 2 1 - # functions in client pages 12 10 10 - # cloned client functions 12 4 2 - # clusters of cloned client functions 4 2 1 - # forms in client pages 1 8 10 - # cloned client forms 0 2 9 - # clusters of clo ned client forms 0 1 3 - # tables in client pages 7 4 3 - # cloned client tables 0 0 0 - # clusters of cloned client tables 0 0 0 - # ASP pages 19 73 37 71 # cloned ASP pages 2 15 3 2 # clusters of cloned ASP pages 1 6 1 1 # scripts in ASP pages 75 576 150 5341 # cloned ASP scripts 4 0 36 0 # clusters of cloned ASP scripts 2 0 3 0 # functions/subroutines in ASP pages 5 0 3 165 # cloned ASP functions/subroutines 0 0 0 9 # clusters of cloned ASP 0 0 0 3 functions/subroutines
  • 19. Conclusions  A clone detection method has been presented  An experiment has been carried out  Many cluster of cloned artifact has been detected and validated  Some reusable component has been abstracted as templates  Reengineering of static pages in a XML/XSL architecture may be performed  Reuse of components or pages may be performed

Hinweis der Redaktion

  1. In this talk, I will face the lack of reusability
  2. The classic copy and paste We notice that C&P is often used during WA development, due also to ow know how of developers. So, we can find many software clones. We have two problems to solve: Identification of clones Reuse of clones
  3. What is a clone?
  4. What is a clone?
  5. Fundamental distances are Levenshtein and Euclidean distance. These distances measure the distances between two vector of the same length. L. Distance is the minimum number of … L. Distance is a specialization of edit distance, with the same weight for each operation E. Distance is the geometric distance between two vectors, the square root of the sum of the squares of the differences between corrispondent elements of the two vectors
  6. 4 metrics has been considered: STH is used to compare portions of client pages AMA is used to compare server script blocks
  7. The metrics used to calculate Asp Metrics Array are …
  8. Nella prima fase un’analisi statica viene fatta per ricavare i dati necessari al calcolo delle metriche: vettore dei tag HTML, etc. etc. Nella seconda fase si procede al confronto di ogni coppia di pagine, form, block, function, table, in cerca di cloni o near miss clone Nella terza fase la meaningfulness e la completeness dei candidati cloni sono esaminate da un utente Nella quarta fase, viene isolata in un template la parte di controllo costante di un cluster di cloni (o near miss clone). La struttura di tali template è salvata in un database repository
  9. We define clone a set of components with zero distance. We define Near-miss-clone if this distance is lower than a fixed experimental threshold
  10. The detected set of clones need to be submitted to a validation activity aiming at assessing if they can be actually considered reusable components or not. Business domain knowledge and experience in building Web applications will be required for carrying out the validation activity.
  11. Each set of validated clones is called cluster. In figure, on the left side, we see a client page whose structure was cloned. On the right side, we see its template, where each data has been substituted with a dummy element
  12. We can operate a reengineering of cluster of cloned components
  13. We considered only exact clones