JAVASCRIPT ASYNCHRONOUS PROGRAMMING
PDF

Keywords

javascript
asynchronous programming
code smell
error handling

Abstract

JavaScript has become more and more popular in recent years because its wealthy features as being dynamic, interpreted and object-oriented with first-class functions. Furthermore, JavaScript is designed with event-driven and I/O non-blocking model that boosts the performance of overall application especially in the case of Node.js. To take advantage of these characteristics, many design patterns that implement asynchronous programming for JavaScript were proposed. However, choosing a right pattern and implementing a good asynchronous source code is a challenge and thus easily lead into less robust application and low quality source code. Extended from our previous works on exception handling code smells in JavaScript and exception handling code smells in JavaScript asynchronous programming with promise, this research aims at studying the impact of three JavaScript asynchronous programming patterns on quality of source code and application.
https://doi.org/10.26459/hueuni-jtt.v128i2B.5104
PDF

References

  1. Fred K. S., “The Node.js Way - Understanding Error-First Callbacks”, Available: http://fredkschott.com/post/2014/03/understanding-error-first-callbacks-in-node-js/, date accessed: 16/11/2018.
  2. C. Hell, “Callback Hell”, Available: http://callbackhell.com/, date accessed: 16/11/2018.
  3. Kris K., “A Promise Library for JavaScript”, Available: https://github.com/ kriskowal/q, date accessed: 22/11/2018.
  4. Forbes L., “Promises”, Available: https://www.promisejs.org/, date accessed: 22/11/2018.
  5. ECMA International, “Standard ECMA-262, 6th Edition/June 2015, ECMAScript 2015 Language Specification”, 2015.
  6. L. M. Canh and T. T. Luong, “Exception handling in Javascript asynchronous programming with Promise”, Journal of Science and Technology, 2017.
  7. C.-Y. Hsieh, L. M. Canh, H. Kim Thoa and Y. C. Cheng, “Identifcation and Refactoring of Exception Handling Code Smells”, Journal of Internet Technology, Vol. 18, No. 6, pp. 1461– 1471, 2018.
  8. ECMA International, “Standard ECMA-262, 9th Edition/June 2018, ECMAScript 2018 Language Specification”, 2018.
  9. C.-T. Chen, Y. C. Cheng, C.-Y. Hsieh and I.-L. Wu, “Exception Handling Refactorings: Directed By Goals and Driven By Bug Fixing”, The Journal of Systems and Software, Vol. 82, No. 2, pp. 333–345, 2009.
  10. ECMA International, “Standard ECMA-262, 8th Edition/June 2017, ECMAScript 2017 Language Specification”, 2017.
  11. Ilya K., “Promises, Async/Await”, Available: https://javascript.info/async-await, date accessed: 22/11/2018.
  12. Mozilla, “Concurrency Model and Event Loop”, Available: https://developer.mozilla. org/en-US/docs/Web/JavaScript/EventLoop, date accessed: 18/11/2018.
Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright (c) 2019 Array