Output-oriented Refactoring in PHP-based Dynamic Web Applications

被引:1
|
作者
Hoan Anh Nguyen [1 ]
Hung Viet Nguyen [1 ]
Tung Thanh Nguyen [1 ]
Nguyen, Tien N. [1 ]
机构
[1] Iowa State Univ, Dept Elect & Comp Engn, Ames, IA 50011 USA
关键词
refactoring; output-oriented; dynamic Web;
D O I
10.1109/ICSM.2013.26
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Refactoring is crucial in the development process of traditional programs as well as advanced Web applications. In a dynamic Web application, multiple versions of client code in HTML and JavaScript are dynamically generated from server-side code at run time for different usage scenarios. Toward understanding refactoring for dynamic Web code, we conducted an empirical study on several PHP-based Web applications. We found that Web developers perform a new type of refactoring that is specific to PHP-based dynamic Web code and pertain to output client-side code. After such a refactoring, the server-side code is more compact and modular with less amount of embedded and inline client-side HTML/JS code, or produces more standard-conforming client-side code. However, the corresponding output client-side code of the server code before and after the refactoring provides the same external behavior. We call it output-oriented refactoring. Our finding in the study motivates us to build WebDyn, an automatic tool for dynamicalizing refactorings. When performing on a portion of server-side code (which might contain both PHP and embedded/inline HTML/JS code), WebDyn detects the repeated and varied parts in that code portion and produces dynamic PHP code that creates the same client-side code. Our empirical evaluation on several projects showed WebDyn's accuracy in such automated refactorings.
引用
收藏
页码:150 / 159
页数:10
相关论文
共 50 条
  • [1] Dangling References in Multi-configuration and Dynamic PHP-Based Web Applications
    Hung Viet Nguyen
    Hoan Anh Nguyen
    Tung Thanh Nguyen
    Anh Tuan Nguyen
    Nguyen, Tien N.
    [J]. 2013 28TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2013, : 399 - 409
  • [2] Dangling references in multi-configuration and dynamic PHP-based Web applications
    Nguyen, Hung Viet
    Nguyen, Hoan Anh
    Nguyen, Tung Thanh
    Nguyen, Anh Tuan
    Nguyen, Tien N.
    [J]. 2013 28th IEEE/ACM International Conference on Automated Software Engineering, ASE 2013 - Proceedings, 2013, : 399 - 409
  • [3] An Architecture of Dynamically Adaptive PHP-based Web Applications
    Nakajima, Shin
    [J]. 2011 18TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2011), 2011, : 203 - 210
  • [4] DRC: A Detection Tool for Dangling References in PHP-Based Web Applications
    Hung Viet Nguyen
    Hoan Anh Nguyen
    Tung Thanh Nguyen
    Nguyen, Tien N.
    [J]. PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), 2013, : 1299 - 1302
  • [5] ShellBreaker: Automatically detecting PHP-based malicious web shells
    Li, Yu
    Huang, Jin
    Ikusan, Ademola
    Mitchell, Milliken
    Zhang, Junjie
    Dai, Rui
    [J]. COMPUTERS & SECURITY, 2019, 87
  • [6] Use of Design Patterns in PHP-Based Web Application Frameworks
    Paikens, Andris
    Arnicans, Guntis
    [J]. BALTIC JOURNAL OF MODERN COMPUTING, 2008, 733 : 53 - 71
  • [7] Exploring output-based coverage for testing PHP web applications
    Hung Viet Nguyen
    Hung Dang Phan
    Kastner, Christian
    Nguyen, Tien N.
    [J]. AUTOMATED SOFTWARE ENGINEERING, 2019, 26 (01) : 59 - 85
  • [8] Exploring output-based coverage for testing PHP web applications
    Hung Viet Nguyen
    Hung Dang Phan
    Christian Kästner
    Tien N. Nguyen
    [J]. Automated Software Engineering, 2019, 26 : 59 - 85
  • [9] An Output-Oriented Approach of Test Data Generation Based on Genetic Algorithm
    Zhang, Weixiang
    Wei, Bo
    Du, Huisen
    [J]. ALGORITHMS AND ARCHITECTURES FOR PARALLEL PROCESSING, ICA3PP 2015, 2015, 9532 : 100 - 108
  • [10] Multi-Dimensional Output-Oriented Power System Resilience based on Degraded Functionality
    Valinejad, Jaber
    Mili, Lamine
    van der Wal, C. Natalie
    von Spakovsky, Michael
    Xu, Yijun
    [J]. 2021 IEEE POWER & ENERGY SOCIETY GENERAL MEETING (PESGM), 2021,