抄録
In JavaScript handlers, callbacks are widely used to develop rich responsive and interactive Web applications. However, the dependency among nested callbacks, known as callback hell, can make it difficult to understand and maintain them, which will eventually mix concerns. 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 handlers that need nested callbacks 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, our proposal 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.
本文言語 | English |
---|---|
ホスト出版物のタイトル | 32nd Annual ACM Symposium on Applied Computing, SAC 2017 |
出版社 | Association for Computing Machinery |
ページ | 1245-1250 |
ページ数 | 6 |
巻 | Part F128005 |
ISBN(電子版) | 9781450344869 |
DOI | |
出版ステータス | Published - 2017 4月 3 |
イベント | 32nd Annual ACM Symposium on Applied Computing, SAC 2017 - Marrakesh, Morocco 継続期間: 2017 4月 4 → 2017 4月 6 |
Other
Other | 32nd Annual ACM Symposium on Applied Computing, SAC 2017 |
---|---|
国/地域 | Morocco |
City | Marrakesh |
Period | 17/4/4 → 17/4/6 |
ASJC Scopus subject areas
- ソフトウェア