首页> 外文会议>IEEE International Conference on Software Maintenance >Output-oriented Refactoring in PHP-based Dynamic Web Applications
【24h】

Output-oriented Refactoring in PHP-based Dynamic Web Applications

机译:基于PHP的动态Web应用中的输出导向重构

获取原文

摘要

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.
机译:重构在传统计划的开发过程以及高级Web应用程序中至关重要。在动态Web应用程序中,HTML和JavaScript中的多个版本的客户端代码在运行时从服务器端代码动态生成,以进行不同的使用场景。对理解动态Web代码的重构,我们对基于PHP的Web应用进行了实证研究。我们发现Web开发人员执行新类型的重构,特定于基于PHP的动态Web代码,并涉及输出客户端代码。在这样的重构之后,服务器端代码更紧凑且模块化,嵌入式和内联客户端HTML / JS代码更少,或者产生更多标准符合客户端代码。但是,重构之前和之后的服务器代码的相应输出客户端代码提供相同的外部行为。我们称之为导向输出的重构。我们在研究中的发现使我们能够构建Webdyn,这是一种用于动态化重构的自动工具。在服务器端代码的一部分(可能包含PHP和嵌入/内联HTML / JS代码)上执行时,WebDyn在该代码部分中检测到重复和各种部分,并产生创建相同的客户端代码的动态PHP代码。我们对多个项目的实证评估显示了这种自动重构的Webdyn的准确性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号