JavaScript as an Embedded DSL

Developing rich web applications requires mastering different environments on the client and server sides. While there is considerable choice on the server-side, the client-side is tied to JavaScript, which poses substantial software engineering challenges, such as moving or sharing pieces of code between the environments. We embed JavaScript as a DSL in Scala, using Lightweight Modular Staging. DSL code can be compiled to JavaScript or executed as part of the server application. We use features of the host language to make client-side programming safer and more convenient. We use gradual typing to interface typed DSL programs with existing JavaScript APIs. We exploit a selective CPS transform already available in the host language to provide a compelling abstraction over asynchronous callback-driven programming in our DSL.


Editor(s):
Noble, James
Published in:
ECOOP 2012 – Object-Oriented Programming, 7313, 409-434
Presented at:
26th European Conference on Object-Oriented Programming, Beijing, China, June 11-16, 2012
Year:
2012
Publisher:
Berlin, Heidelberg, Springer Berlin Heidelberg
Keywords:
Laboratories:




 Record created 2012-07-05, last modified 2018-03-17

Postprint:
Download fulltextPDF
External link:
Download fulltextURL
Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)