Hiphop.js: a language to orchestrate web applications
Résumé
INTRODUCTION
We are interested in web orchestration, which is the problem of appropriately handling the asynchronous events appearing in pro- gram executions. It is known be one of the major difficulties of web programming (see callback hell [9, 11]). High-level approaches to orchestrate web applications have been developed in academia or industry. The Functional Reactive Program- ming (FRP) concept [4] has been carried up to the web by Flapjax [5,10],whichadoptsadataflowprogrammingstyle:whenavariable is modified, any expression that references it is implicitly reevalu- ated. Others techniques targeting GUI updates [1, 6, 8, 12] consist in associating a state with a set of graphical elements and auto- matically updating the graphics on changes. In JavaScript Promises and async/await constructions [7] make it possible to chain asyn- chronous actions in a specific sequential order. Working at a more abstract level, these solutions avoid using callbacks. Our goal is to go further with yet another solution based on a new language called Hiphop.js. It is a JavaScript extension of Esterel [2] based on three reactive control mechanisms: explicit con- currency, synchronisation using synchronous signals, which makes the handling of concurrent issues much easier, and preemption, i.e. the explicit cancellation of an ongoing orchestration subactivity. Hiphop.js suitably extends the core Esterel notions to deal with web paradigms such as application structure dynamicity. Hiphop.js follows a previous Scheme-based prototype [3], but takes different approaches w.r.t. the interaction with the host language. This paper gives an informal introduction to Hiphop.js through a small example that compares the programming of a simple event- aware program in both JavaScript and Hiphop.js.
We are interested in web orchestration, which is the problem of appropriately handling the asynchronous events appearing in pro- gram executions. It is known be one of the major difficulties of web programming (see callback hell [9, 11]). High-level approaches to orchestrate web applications have been developed in academia or industry. The Functional Reactive Program- ming (FRP) concept [4] has been carried up to the web by Flapjax [5,10],whichadoptsadataflowprogrammingstyle:whenavariable is modified, any expression that references it is implicitly reevalu- ated. Others techniques targeting GUI updates [1, 6, 8, 12] consist in associating a state with a set of graphical elements and auto- matically updating the graphics on changes. In JavaScript Promises and async/await constructions [7] make it possible to chain asyn- chronous actions in a specific sequential order. Working at a more abstract level, these solutions avoid using callbacks. Our goal is to go further with yet another solution based on a new language called Hiphop.js. It is a JavaScript extension of Esterel [2] based on three reactive control mechanisms: explicit con- currency, synchronisation using synchronous signals, which makes the handling of concurrent issues much easier, and preemption, i.e. the explicit cancellation of an ongoing orchestration subactivity. Hiphop.js suitably extends the core Esterel notions to deal with web paradigms such as application structure dynamicity. Hiphop.js follows a previous Scheme-based prototype [3], but takes different approaches w.r.t. the interaction with the host language. This paper gives an informal introduction to Hiphop.js through a small example that compares the programming of a simple event- aware program in both JavaScript and Hiphop.js.
Domaines
Informatique et langage [cs.CL]Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...