A JavaScript Transpiler for Escaping from Complicated Usage of Cloud Services and APIs

We propose Escapin, a JavaScript transpiler for developing application programs that consume APIs and are deployed on cloud services in order to obtain new business concepts by trial-and-error iterations. Escapin tackles two difficulties in consuming API and using cloud services; 1) understanding the correct usage of cloud services and APIs requires a lot of time, and 2) programs using cloud service SDKs and HTTP clients are complicated. Escapin introduces two new features to the ECMAScript 2018 specification for simplifying application programs: importing APIs as objects and exporting objects and functions as cloud service resources. Escapin transpiles a JavaScript program independent from any platform into a JavaScript program containing concrete usages of APIs and cloud services. Escapin encourages engineers to write a callback-agnostic program, which represents asynchronous processing as a completely synchronized procedure without any asynchronization feature such as callback, Promise, async/await, etc. Escapin also accepts programs having nesting callbacks. Escapin destructures nesting callbacks in the programs to obtain a callback-agnostic program. Our experimental results show that in the task of developing an application that consumes Uber API and is deployed on Amazon Web Services, Escapin statistically significantly reduces development time and the metrics regarding the simplicity of source code with huge effects: lines of code, cyclomatic complexity, and cognitive complexity.

[1]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[2]  Alfredo Benso,et al.  A C/C++ source-to-source compiler for dependable applications , 2000, Proceeding International Conference on Dependable Systems and Networks. DSN 2000.

[3]  Vijay K. Naik,et al.  Riding and thriving on the API hype cycle , 2016, Commun. ACM.

[4]  S. Sawilowsky New Effect Size Rules of Thumb , 2009 .

[5]  Ali Mesbah,et al.  Understanding JavaScript Event-Based Interactions with Clematis , 2016, ACM Trans. Softw. Eng. Methodol..

[6]  Jacob Cohen Statistical Power Analysis for the Behavioral Sciences , 1969, The SAGE Encyclopedia of Research Design.

[7]  Rudolf Ferenc,et al.  Transforming C++11 Code to C++03 to Support Legacy Compilation Environments , 2016, 2016 IEEE 16th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[8]  Jie Wang,et al.  A comprehensive study on real world concurrency bugs in Node.js , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[9]  Ali Mesbah,et al.  Understanding Asynchronous Interactions in Full-Stack JavaScript , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[10]  Shinji Kusumoto,et al.  Generating simpler AST edit scripts by considering copy-and-paste , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[11]  Julian Dolby,et al.  Statically Checking Web API Requests in JavaScript , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[12]  Paul D. Ellis,et al.  The essential guide to effect sizes : statistical power, meta-analysis, and the interpretation of research results , 2010 .

[13]  Eelco Bakker,et al.  The lean startup , 2015 .

[14]  P. Mell,et al.  The NIST Definition of Cloud Computing , 2011 .

[15]  Avik Chaudhuri,et al.  Fast and precise type checking for JavaScript , 2017, Proc. ACM Program. Lang..

[16]  Martin P. Robillard,et al.  A study of the effectiveness of usage examples in REST API documentation , 2017, 2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[17]  Marco Torchiano,et al.  A source-to-source compiler for generating dependable software , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[18]  Roy Fielding,et al.  Architectural Styles and the Design of Network-based Software Architectures"; Doctoral dissertation , 2000 .