SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
Recovering a Business Object
Model from Web Applications

    U. De Carlini, A.R. Fasolino, P. Tramontana
             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




                                                          1
Web Applications (WA):
             problems and open issues

World Wide Web is evolving

WA are realized with a limited quality due to the
pressure of a short time-to-market and an
extremely high competition
-   WA developed without a disciplined process
-   Poor, inadequate, incomplete documentation
-   Disordered architecture




                                                    2
Web Applications (WA):
           problems and open issues


⇒ Maintenance,  Reengineering and Migration
 are very critical tasks for WA

⇒ ObjectOriented Business Level Models are
 a fundamental starting point for these
 tasks


                                          3
Web Application Model

                                                        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




                                                                                                            4
Business Level UML Diagrams


Business level UML diagrams describe
the relevant conceptual components
(business objects) from the domain of
the problem addressed by the WA and
their mutual relationships and
interactions


                                        5
Recovering a Business Level Class Diagram

A Reverse Engineering process in three main
   steps:

1) Identification of candidate classes and their
     attributes;
2)   Association of methods to candidate classes;
3)   Identification of relationships between
     candidate classes.


                                                    6
1) Identification of candidate classes

 Searching for groups of logically related
 data making up the state of objects.

⇒Looking for language mechanisms that
 allow grouping of related data
 implementing a relevant concept, either
 from the domain of the application or from
 domain of the solution


                                             7
Identification of relevant groups of data
 Groups of data in input/output operations
    data involved in HTML forms, HTML tables, ….

 Groups of data in database/files read/write
 operations
    data involved in Recordsets, Arrays, Collections, ...

 Groups of data passed throw distinct page
    data involved in Querystrings




                                                            8
Synonyms and Homonyms Analysis

  Synonyms are identifiers with different names but the
  same meaning
  Homonyms are identifiers with the same name but
 different meanings
⇒Synonym identifiers must be assigned with the same
 unique name.
⇒Homonym identifiers must be associated with distinct
 names.

During synonyms & homonyms analysis, a meaningful
  name is assigned to each data item

                                                          9
An automatic procedure to propose a set of
            candidate classes

    the identified data groups are arranged in a list and sorted in descending
    order with the number of references made to each data group, and in
    ascending order with the cardinality of each group; this sorted list is called
    OrdList;
    the first group in OrdList is considered as a candidate object and moved into a
    new list of candidate objects, CAND;
    the OrdList is sequentially visited and each group is considered: if a group
    comprises at least a new data item not yet included in any other group in the
    CAND list, it will be inserted in CAND;
    the OrdList is examined until it includes at least a group, or until the union set
    of all the data items of the candidate objects in CAND and the union set of all
    the data items of the groups in Glist are equal;
    if a group h from the OrdList includes all the data items making up one or
    more groups Ci in CAND, only the k data items in h that are not yet included
    in any group of CAND are added to the Ci groups whose elements are all
    included in h



                                                                                   10
2) Associating methods to candidate
                 classes

 Possible functional units to be considered should
 include web pages, functions, script blocks,
 depending on the requested degree of granularity.
 The automatic clustering approach proposed in [Di
 Lucca et al.-IWPC 2002], is used to group Web
 pages of a WA into meaningful (highly cohesive)
 and independent (loosely coupled) clusters
⇒Our approach proposes to consider these clusters
 of related Web pages as potential methods to be
 associated with the candidate objects of the WA
                                                11
Coupling between clusters and objects

 Measures of coupling between clusters and
 objects are computed based on the accesses of
 each page in the cluster to the candidate object.
 A page accesses a candidate object when it
 includes instructions that define or use the value
 of some object attribute




                                                  12
Associating pages to candidate classes

 ⇒ If a cluster accesses exclusively one object, it will be
  assigned as a method of that object.

 ⇒ If a cluster accesses more objects, it will be assigned
  to the candidate class it accesses prevalently

 ⇒ Clusters that do not make access to any objects will
  be considered as coordinating modules controlling the
  executions of other methods




                                                          13
3) Identification of relationships
           between classes

Relationships are found in two cases:
   If two or more candidate classes have
   common attributes;
   If a cluster accesses more than one
   candidate class



                                           14
Common attributes

 If two or more classes Ci have a common
 attribute:
  ⇒  the attribute is assigned to one of these
    classes (Cj) and deleted from other classes Ck;
  ⇒ A relationship will be defined between the
    class Cj and each class Ck

⇒These relationships will be depicted as
 UML association relationships

                                                 15
Clusters accessing more than one class

⇒ Ifa cluster is assigned as a method to a
 candidate class C0, but it accesses
 attributes of other classes Ci, a
 relationship will be defined between class
 C0 and each class Ci
⇒Also this kind of relationships will be
 depicted as UML association relationships

                                              16
A case study

a WA designed to support the activities of
undergraduated courses offered by a
Computer Science Department
Developed with ASP, Javascript, HTML
languages
75 server pages, 23 client pages, 1 utility
module (7648 LOCs)

                                          17
Identification of groups of data

After static analysis of the WA:
  128 references to data groups (485 data
  items)
After Synonyms and Homonyms Analysis:
  43 different data groups (26 different data
  items)



                                                18
Data Groups
                 Data groups                                                           #
An excerpt   C1 Student name, Student surname, Student code, Student email,           14
                 Student phone number, Student password
of the 43    C2 Teacher name, Teacher surname, Teacher email, Teacher phone           11
different        number, Teacher password, Teacher code
             C3 Exam date, Exam time, Exam classroom                                  10
Data         C4 Student name, Student surname, Student code, Student email,            8
Groups           Student phone number
             C5 Tutoring date, Tutoring start time, Tutoring end time, Course code,    7
obtained         Course name
after        C6 Student code                                                           6
Synonyms     C7 Course code, Course name, Course academic year
             C8 Course code
                                                                                       5
                                                                                       4
and          C9 Course code, Course name                                               4
Homonyms     C10 Teacher name, Teacher surname, Teacher email, Teacher phone
                 number, Teacher password
                                                                                       4

Analysis     C11 Course code, Course academic year                                     3




                                                                                      19
Candidate classes
                             Candidate classes and corresponding attributes
8 Candidate
                   Student                   (Student name, Student surname, Student
Classes                                     code, Student email, Student phone number,
obtained after                              Student password)
the execution of   Teacher                   (Teacher name, Teacher surname, Teacher
the algorithm                               email, Teacher phone number, Teacher
                                            password, Teacher code)
Produce
                   Exam Session              (Exam date, Exam time, Exam classroom)
Candidate          Tutoring                  (Tutoring date, Tutoring start time,
Objects.                                    Tutoring end time, Course code, Course
                                            name)
                   Course                    (Course code, Course name, Course
                                            academic year)
                   Tutoring Request          (Student name, Student surname, Student
                                            code, Tutoring request date)
                   News                      (Course code, News text, News number,
                                            News date, Teacher code)
                   Exam Reservation          (Student code, Student name, Student
                                            surname, Course code, Exam date, Exam
                                            reservation date)

                                                                                         20
Associating methods to candidate
             classes

Automatic clustering approach was applied
  44 valid clusters were recovered
    16 clusters did not reference any data group, so
    they were considered as coordinator modules
    28 clusters were assigned as methods of the
    candidate classes




                                                       21
Business Level UML Class Diagram

                                       Student
                                    Name
                                    Surname             Exam Reservation
                                    E-mail          Date
                                    Password
                                    Code
                                    Phone number




                         Tutoring
                       Date
                       Start time
                       End t ime



                                       Course                Exam
    Tutoring request
                                    Academic year         Date
Date                                Code                  Time
                                    Name                  Classroom




       Teacher
    Name                               News
    Surname
                                     Number
    E-mail                           Date
    Phone number
    Password                         Text
    Code

                                                                           22
Conclusions

A reverse engineering approaches for recovering,
from the code of a Web application, business a
Business Object Model has been presented
Some experiments were carried out to assess the
effectiveness of the proposed approaches.
Encouraging results as to the adequacy of the
recovered models were obtained.
A limited human effort required for reconstructing
the models was recorded too.


                                                 23
Future Work

The definition of criteria for a further automation of
the model reconstruction will be addressed, as well
as the investigation on possible approaches for
identifying UML aggregations, compositions, or
generalization-specialization relationships between
classes will be carried out.
A wider experimentation involving more complex
Web Applications, implemented with different
technologies, will be moreover carried out, in order
to extend the validity of the proposed approaches

                                                   24

Mais conteúdo relacionado

Semelhante a Recovering a Business Object Model from Web Applications

International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Aravinth NSP
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicity
hannonhill
 
Nhibernate Part 1
Nhibernate   Part 1Nhibernate   Part 1
Nhibernate Part 1
guest075fec
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
Alex Ali
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
Dr Chetan Shelke
 
10265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 201010265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 2010
bestip
 

Semelhante a Recovering a Business Object Model from Web Applications (20)

ppt
pptppt
ppt
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicity
 
Programming with Objective-C
Programming with Objective-CProgramming with Objective-C
Programming with Objective-C
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
Nhibernate Part 1
Nhibernate   Part 1Nhibernate   Part 1
Nhibernate Part 1
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
 
Object Orientation.pdf
Object Orientation.pdfObject Orientation.pdf
Object Orientation.pdf
 
Lec2_Information Integration.ppt
 Lec2_Information Integration.ppt Lec2_Information Integration.ppt
Lec2_Information Integration.ppt
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
 
implementing oop_concept
 implementing oop_concept implementing oop_concept
implementing oop_concept
 
Af7ff syllabuslablist
Af7ff syllabuslablistAf7ff syllabuslablist
Af7ff syllabuslablist
 
10265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 201010265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 2010
 
L5 m256 block2_unit5
L5 m256 block2_unit5L5 m256 block2_unit5
L5 m256 block2_unit5
 
Coursebreakup
CoursebreakupCoursebreakup
Coursebreakup
 
B sc it syit sem 3 sem 4 syllabus as per mumbai university
B sc it syit sem 3 sem 4 syllabus as per mumbai universityB sc it syit sem 3 sem 4 syllabus as per mumbai university
B sc it syit sem 3 sem 4 syllabus as per mumbai university
 
Sq lite module4
Sq lite module4Sq lite module4
Sq lite module4
 

Mais de Porfirio 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
 
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
 

Mais de 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...
 
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
 
Rich Internet Application Testing Using Execution Trace Data
Rich Internet Application Testing  Using Execution Trace Data Rich Internet Application Testing  Using Execution Trace Data
Rich Internet Application Testing Using Execution Trace Data
 
An AHP-based Framework for Quality and Security Evaluation
An AHP-based Framework for Quality and Security EvaluationAn AHP-based Framework for Quality and Security Evaluation
An AHP-based Framework for Quality and Security Evaluation
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Recovering a Business Object Model from Web Applications

  • 1. Recovering a Business Object Model from Web Applications U. De Carlini, A.R. Fasolino, P. Tramontana 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 1
  • 2. Web Applications (WA): problems and open issues World Wide Web is evolving WA are realized with a limited quality due to the pressure of a short time-to-market and an extremely high competition - WA developed without a disciplined process - Poor, inadequate, incomplete documentation - Disordered architecture 2
  • 3. Web Applications (WA): problems and open issues ⇒ Maintenance, Reengineering and Migration are very critical tasks for WA ⇒ ObjectOriented Business Level Models are a fundamental starting point for these tasks 3
  • 4. Web Application Model 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 4
  • 5. Business Level UML Diagrams Business level UML diagrams describe the relevant conceptual components (business objects) from the domain of the problem addressed by the WA and their mutual relationships and interactions 5
  • 6. Recovering a Business Level Class Diagram A Reverse Engineering process in three main steps: 1) Identification of candidate classes and their attributes; 2) Association of methods to candidate classes; 3) Identification of relationships between candidate classes. 6
  • 7. 1) Identification of candidate classes Searching for groups of logically related data making up the state of objects. ⇒Looking for language mechanisms that allow grouping of related data implementing a relevant concept, either from the domain of the application or from domain of the solution 7
  • 8. Identification of relevant groups of data Groups of data in input/output operations data involved in HTML forms, HTML tables, …. Groups of data in database/files read/write operations data involved in Recordsets, Arrays, Collections, ... Groups of data passed throw distinct page data involved in Querystrings 8
  • 9. Synonyms and Homonyms Analysis Synonyms are identifiers with different names but the same meaning Homonyms are identifiers with the same name but different meanings ⇒Synonym identifiers must be assigned with the same unique name. ⇒Homonym identifiers must be associated with distinct names. During synonyms & homonyms analysis, a meaningful name is assigned to each data item 9
  • 10. An automatic procedure to propose a set of candidate classes the identified data groups are arranged in a list and sorted in descending order with the number of references made to each data group, and in ascending order with the cardinality of each group; this sorted list is called OrdList; the first group in OrdList is considered as a candidate object and moved into a new list of candidate objects, CAND; the OrdList is sequentially visited and each group is considered: if a group comprises at least a new data item not yet included in any other group in the CAND list, it will be inserted in CAND; the OrdList is examined until it includes at least a group, or until the union set of all the data items of the candidate objects in CAND and the union set of all the data items of the groups in Glist are equal; if a group h from the OrdList includes all the data items making up one or more groups Ci in CAND, only the k data items in h that are not yet included in any group of CAND are added to the Ci groups whose elements are all included in h 10
  • 11. 2) Associating methods to candidate classes Possible functional units to be considered should include web pages, functions, script blocks, depending on the requested degree of granularity. The automatic clustering approach proposed in [Di Lucca et al.-IWPC 2002], is used to group Web pages of a WA into meaningful (highly cohesive) and independent (loosely coupled) clusters ⇒Our approach proposes to consider these clusters of related Web pages as potential methods to be associated with the candidate objects of the WA 11
  • 12. Coupling between clusters and objects Measures of coupling between clusters and objects are computed based on the accesses of each page in the cluster to the candidate object. A page accesses a candidate object when it includes instructions that define or use the value of some object attribute 12
  • 13. Associating pages to candidate classes ⇒ If a cluster accesses exclusively one object, it will be assigned as a method of that object. ⇒ If a cluster accesses more objects, it will be assigned to the candidate class it accesses prevalently ⇒ Clusters that do not make access to any objects will be considered as coordinating modules controlling the executions of other methods 13
  • 14. 3) Identification of relationships between classes Relationships are found in two cases: If two or more candidate classes have common attributes; If a cluster accesses more than one candidate class 14
  • 15. Common attributes If two or more classes Ci have a common attribute: ⇒ the attribute is assigned to one of these classes (Cj) and deleted from other classes Ck; ⇒ A relationship will be defined between the class Cj and each class Ck ⇒These relationships will be depicted as UML association relationships 15
  • 16. Clusters accessing more than one class ⇒ Ifa cluster is assigned as a method to a candidate class C0, but it accesses attributes of other classes Ci, a relationship will be defined between class C0 and each class Ci ⇒Also this kind of relationships will be depicted as UML association relationships 16
  • 17. A case study a WA designed to support the activities of undergraduated courses offered by a Computer Science Department Developed with ASP, Javascript, HTML languages 75 server pages, 23 client pages, 1 utility module (7648 LOCs) 17
  • 18. Identification of groups of data After static analysis of the WA: 128 references to data groups (485 data items) After Synonyms and Homonyms Analysis: 43 different data groups (26 different data items) 18
  • 19. Data Groups Data groups # An excerpt C1 Student name, Student surname, Student code, Student email, 14 Student phone number, Student password of the 43 C2 Teacher name, Teacher surname, Teacher email, Teacher phone 11 different number, Teacher password, Teacher code C3 Exam date, Exam time, Exam classroom 10 Data C4 Student name, Student surname, Student code, Student email, 8 Groups Student phone number C5 Tutoring date, Tutoring start time, Tutoring end time, Course code, 7 obtained Course name after C6 Student code 6 Synonyms C7 Course code, Course name, Course academic year C8 Course code 5 4 and C9 Course code, Course name 4 Homonyms C10 Teacher name, Teacher surname, Teacher email, Teacher phone number, Teacher password 4 Analysis C11 Course code, Course academic year 3 19
  • 20. Candidate classes Candidate classes and corresponding attributes 8 Candidate Student (Student name, Student surname, Student Classes code, Student email, Student phone number, obtained after Student password) the execution of Teacher (Teacher name, Teacher surname, Teacher the algorithm email, Teacher phone number, Teacher password, Teacher code) Produce Exam Session (Exam date, Exam time, Exam classroom) Candidate Tutoring (Tutoring date, Tutoring start time, Objects. Tutoring end time, Course code, Course name) Course (Course code, Course name, Course academic year) Tutoring Request (Student name, Student surname, Student code, Tutoring request date) News (Course code, News text, News number, News date, Teacher code) Exam Reservation (Student code, Student name, Student surname, Course code, Exam date, Exam reservation date) 20
  • 21. Associating methods to candidate classes Automatic clustering approach was applied 44 valid clusters were recovered 16 clusters did not reference any data group, so they were considered as coordinator modules 28 clusters were assigned as methods of the candidate classes 21
  • 22. Business Level UML Class Diagram Student Name Surname Exam Reservation E-mail Date Password Code Phone number Tutoring Date Start time End t ime Course Exam Tutoring request Academic year Date Date Code Time Name Classroom Teacher Name News Surname Number E-mail Date Phone number Password Text Code 22
  • 23. Conclusions A reverse engineering approaches for recovering, from the code of a Web application, business a Business Object Model has been presented Some experiments were carried out to assess the effectiveness of the proposed approaches. Encouraging results as to the adequacy of the recovered models were obtained. A limited human effort required for reconstructing the models was recorded too. 23
  • 24. Future Work The definition of criteria for a further automation of the model reconstruction will be addressed, as well as the investigation on possible approaches for identifying UML aggregations, compositions, or generalization-specialization relationships between classes will be carried out. A wider experimentation involving more complex Web Applications, implemented with different technologies, will be moreover carried out, in order to extend the validity of the proposed approaches 24