TAE-JS: automated enhancement of JavaScript programs by leveraging the Java annotations infrastructure

  • Authors:
  • Myoungkyu Song;Eli Tilevich

  • Affiliations:
  • Virginia Tech, Blacksburg, VA;Virginia Tech, Blacksburg, VA

  • Venue:
  • Proceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Recent state-of-the-art approaches enhance JavaScript programs with concerns (e.g., persistence, security, transactions, etc.) by modifying the source code by hand to use special libraries. As a result, adding concerns to a JavaScript program creates divergent codebases that must be maintained separately. At the core of the problem is that JavaScript lacks metadata to express concerns declaratively. In this paper, we present a declarative approach to enhancing JavaScript programs that applies the Java annotations infrastructure to JavaScript, without extending the JavaScript language. An IDE combines JavaScript and Java during the development, but processes the languages separately. Programmers declare how concerns should be added to a JavaScript program using Java annotations. Based on the annotations, a code generator synthesizes aspect code that adds the specified concerns. Although these enhancements are implemented as third-party libraries, our approach can transparently insert them into JavaScript programs given a declarative specification.