Abstract

Web browsers have evolved into indispensable software platforms for modern applications. Although JavaScript has become a de-facto lingua franca for developing web applications, the JavaScript software development tools and methodologies lag behind those of languages such as Java and C#. In particular, to enhance JavaScript programs with non-functional concerns (e.g., persistence, security, transactions, and logging) JavaScript developers need to modify the source code by hand. Developers then often end up having to maintain the resulting modified version separately for reasons that include poor design, the complexities of program evolution, and fundamental language limitations. The necessity to modify code by hand could be avoided if JavaScript had metadata facilities for developers to specify non-functional concerns declaratively. To address this problem, we present a novel declarative approach, T ransparent A utomated E nhancement for J ava S cript (TAE-JS) that enhances JavaScript programs with the ability to use declarative metadata. The metadata is expressed by means of Java annotations. We have implemented our technique in an open-source plug-in for the Eclipse IDE. This plug-in allows a developer to enhance the original version of a JavaScript program by specifying concerns declaratively using Java annotations. It then analyzes an original version of the program to automatically generate enhanced program versions by adding the declared concerns. We evaluated TAE-JS with four practical examples that enhance JavaScript programs by declaratively adding concerns such as persistence, security, transactions, and logging. In a user study with ten student developers and three professional engineers at PayPal, the participants viewed favorably TAE-JS's flexible declarative enhancement capabilities, seeing them as a valuable mechanism for implementing non-functional concerns in JavaScript programs. Our evaluation results are promising in demonstrating the potential benefits of our approach to complement existing JavaScript development tools.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.