一句话:提出 EvolutionSaver,用静态分析与代码变换自动完成 Web 应用在数据库 schema 变更后的代码重构与一致性检查。
现代 Web 应用管理着大量用户数据,数据库 schema 频繁变更,开发者必须同步修改应用代码以保持二者一致。已有研究与作者的调查都表明,这类重构既容易出错又十分耗时。本文提出 EvolutionSaver,一个静态代码分析与变换工具,能够自动完成与 schema 相关的代码重构并进行一致性检查:它分析应用代码对数据模型的使用,确定 schema 变更所影响的范围,并自动改写相应代码,同时检查是否有遗漏的不一致之处。该工具被实现为一个 IDE 插件,同时支持 Rails 与 Django 应用;其源码已在 GitHub 公开,插件可从 Visual Studio Marketplace 下载,并配有在线教程与 DOI 存档。
Modern web applications manipulate a large amount of user data and undergo frequent data-schema changes. These changes bring up a unique refactoring task: updating application code to be consistent with data schema. Previous study and our own investigation show that this type of refactoring is error-prone and time-consuming for developers. This paper presents EvolutionSaver, a static code analysis and transformation tool that automates schema-related code refactoring and consistency checking. EvolutionSaver is implemented as an IDE plugin that works for both Rails and Django applications. The source code of EvolutionSaver is available on Github [1] and the plugin can be downloaded from Visual Studio Marketplace [2], with its tutorial available at https://www.youtube.com/watch?v=qBiMkLFIjbE and DOI 10.5281/zenodo.5276127.
DOI 原文 ·
@inproceedings{paperbot6581,
title = {Automated Code Refactoring upon Database-Schema Changes in Web Applications},
author = {Sophie Xie and Junwen Yang and Shan Lu},
booktitle = {ASE},
year = {2021},
doi = {10.1109/ase51524.2021.9678934}
}