Sync/CC: Continuations and aspects to tame callback dependencies on JavaScript handlers

Paul Leger, Hiroaki Fukuda

研究成果: Conference contribution

1 被引用数 (Scopus)

抄録

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 42017 4 6

Other

Other32nd Annual ACM Symposium on Applied Computing, SAC 2017
CountryMorocco
CityMarrakesh
Period17/4/417/4/6

ASJC Scopus subject areas

  • Software

引用スタイル