View publication
Title | Does JavaScript Software Embrace Classes? |
Authors | Leonardo Humberto Silva, Miguel Ramos, Marco Tulio Valente, Alexandre Bergel, Nicolas Anquetil |
Publication date | 2015 |
Abstract | JavaScript is the de facto programming language for the Web. It is used to implement mail clients, office applications, or IDEs, that can weight hundreds of thousands of lines of code. The language itself is prototype based, but to master the complexity of their application, practitioners commonly rely on informal class abstractions. This practice has never been the target of empirical research in JavaScript. Yet, understanding it is key to adequately tuning programming environments and structure libraries such that they are accessible to programmers. In this paper we report on a large and in-depth study to understand how class emulation is employed in JavaScript applications. We propose a strategy to statically detect class-based abstractions in the source code of JavaScript systems. We used this strategy in a dataset of 50 popular JavaScript applications available from GitHub. We found four types of JavaScript software: class-free (systems that do not make any usage of classes), class-aware (systems that use classes, but marginally), class-friendly (systems that make a relevant usage of classes), and class-oriented (systems that have most of their data structures implemented as classes). The systems in these categories represent, respectively, 26%, 36%, 30%, and 8% of the systems we studied. |
Downloaded | 9 times |
Pages | 73-82 |
Conference name | IEEE International Conference on Software Analysis, Evolution, and Reengineering |
Publisher | IEEE Computer Society Press (Los Alamitos, CA, USA) |
Reference URL |