DocumentCode :
650695
Title :
Output-Oriented Refactoring in PHP-Based Dynamic Web Applications
Author :
Hoan Anh Nguyen ; Hung Viet Nguyen ; Tung Thanh Nguyen ; Nguyen, Tuan N.
Author_Institution :
Electr. & Comput. Eng. Dept., Iowa State Univ., Ames, IA, USA
fYear :
2013
fDate :
22-28 Sept. 2013
Firstpage :
150
Lastpage :
159
Abstract :
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.
Keywords :
Internet; Java; authoring languages; client-server systems; software maintenance; HTML; JS code; JavaScript; PHP-based dynamic Web code; automatic WebDyn tool; dynamicalizing refactorings; output-oriented refactoring; program development process; server-side code; standard-conforming client-side code; Accuracy; Arrays; Cascading style sheets; HTML; Semantics; Servers; Standards; dynamic Web; output-oriented; refactoring;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Maintenance (ICSM), 2013 29th IEEE International Conference on
Conference_Location :
Eindhoven
ISSN :
1063-6773
Type :
conf
DOI :
10.1109/ICSM.2013.26
Filename :
6676886
Link To Document :
بازگشت