1 / 26

Maintenance Patterns of large-scale PHP Web Applications

Maintenance Patterns of large-scale PHP Web Applications Panos Kyriakakis 1 and Alexander Chatzigeorgiou 2 1 Hellenic Open University 2 University of Macedonia, Greece. ICSME’2014, Research Track, October 3, 2014. Ewww , You Use PHP?. CS101 in:

carloshenry
Download Presentation

Maintenance Patterns of large-scale PHP Web Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Maintenance Patterns of large-scale PHP Web Applications Panos Kyriakakis1 and Alexander Chatzigeorgiou2 1 Hellenic Open University 2 University of Macedonia, Greece ICSME’2014, Research Track, October 3, 2014

  2. Ewww, You Use PHP?

  3. CS101 in: MIT : Python Stanford : Javascript (variant) Berkeley: Python Harvard: C, PHP, Javascript Cornell: Python

  4. Goal of this work Study the evolution of Five large open-source PHP Web Applications

  5. Case Study Design 2,674 themes, 110 million downloads 492 contributors for Drupal 5.0 most widely used open source bulletin board system Started in 2000, 1.8 M downloads in sourceforge, translated in 50 languages, ~ 2577 downloads / week “born” in 1998. > 200,000 downloads / month 669 contributors, estimated effort: 136 person-years

  6. Analyzed Projects 390 official releases Lehman's 6th law confirmed 50 years of evolution >36 million LOC

  7. The Approach Downloading Bergmann’s PHP DCD AST analysis

  8. Survival Analysis Survival analysis models the time it takes for events to occur why do we need survival analysis? censored ??????? censored ??????? censored Start of the study time End of the study

  9. Kaplan-Meier curves Survival function S(ti)=1-di/ri Cumulative Probability of surviving up to time t C(ti)=S(ti)*C(ti-1)

  10. Survival Analysis: function usage in PHP Termination event: a function becomes unused

  11. function usage in PHP (2) Survival Analysis  Way of identifyinghotspots Stalactites= hotspots or POI

  12. function usage in PHP (3) Survival function S(ti)=1-di/ri method Additions (%) nuSoap library ADOdblibrary

  13. Hooks /* global array of registered hooks */ $hooks=array(); /* function for registering hooks */ functionadd_action($hook,$funcName){ global$hooks; if(!isset($hooks[$hook])){ $hooks[$hook]=array(); } $hooks[$hook][]=$funcName; } /* function for executing a particular hook */ functiondo_action($hook){ global$hooks; foreach($hooks[$hook]as$fn){ call_user_func($fn); } } /* extensible function */ functionmyFunc(){ /* ... function code ... */ do_action('my_hook'); } /* extension */ functionmyHookFunc(){} Stealth calls /* registering a hook function */ add_hook('my_hook','myHookFunc');

  14. function usage in PHP (3) Stalactive – Stalagmite phenomenon

  15. Survival Analysis: function removal Termination event: a function is removed from the system

  16. function removal in PHP (2) Survival function S(t) Percentage of added methods 45% replaced with methods 62% of removed functions replaced with methods

  17. function removal in PHP (3) However, not all systems convert existing functions to methods Functions are replaced with functions Only new functionality written in OO Why ? Wordpress: > 30,000 plugins, > 2,000 themes Drupal: > 8,000 plugins, >600 themes

  18. Library usage “pre-made building blocks ease and speed up the development of applications” (Tulach, Practical API Design) “external libraries and their usage have a significant impact on the maintenance of the including software”(Bauer et al., ICSM’2012) In PHP library code becomes part of the system’s source code  Easy to measure

  19. Library usage (2) added PHPExcel

  20. Interface Stability 0.09% 0.15% 0.02% 0.94% 0.66% 7.46%

  21. Migration to OO Almost OO Turn to OOP

  22. Evolution of Complexity percentage of functions with CCN in three ranges [0,5) [5,10) >10

  23. Overview of Findings

  24. Future Work

  25. Conclusion Large PHP projects undergo systematic maintenance PHP does not seem to hinder it

  26. Thank you for your attention!! (and have a safe trip back home) ICSME’2014, Research Track, October 3, 2014

More Related