Abstract
In asynchronous programming of JavaScript, callbacks are widely used to develop rich interactiveWeb applications. However, the dependency among callbacks can make it difficult to understand and maintain pieces of code, which will mix concerns eventually. Unfortunately, current solutions for JavaScript do not fully address the aforementioned issue. This paper presents Sync/cc, a JavaScript library that uses continuations and aspects to allow developers to write asynchronous pieces of code in a synchronous style, preventing callback dependencies. Unlike current solutions, Sync/cc is modular, customizable, and succinct because it does not require special and scattered keywords, code refactoring, or adding ad-hoc implementations like state machines. In practice, Sync/cc uses a) continuations to only suspend the current handler execution until the asynchronous operation is resolved, and b) aspects to apply continuations in a non-intrusive way.
Original language | English |
---|---|
Title of host publication | MODULARITY Companion 2016 - Companion Proceedings of the 15th International Conference on Modularity |
Publisher | Association for Computing Machinery, Inc |
Pages | 79-82 |
Number of pages | 4 |
ISBN (Print) | 9781450340335 |
DOIs | |
Publication status | Published - 2016 Mar 14 |
Event | 15th International Conference on Modularity, MODULARITY 2016 - Malaga, Spain Duration: 2016 Mar 14 → 2016 Mar 17 |
Other
Other | 15th International Conference on Modularity, MODULARITY 2016 |
---|---|
Country/Territory | Spain |
City | Malaga |
Period | 16/3/14 → 16/3/17 |
Keywords
- Aspectscript
- Asynchronous programming
- Continuations
- Javascript
- Sync/cc
- Web applications
ASJC Scopus subject areas
- Software