ABSTRACT
This paper presents Flapjax, a language designed for contemporary Web applications. These applications communicate with servers and have rich, interactive interfaces. Flapjax provides two key features that simplify writing these applications. First, it provides event streams, a uniform abstraction for communication within a program as well as with external Web services. Second, the language itself is reactive: it automatically tracks data dependencies and propagates updates along those dataflows. This allows developers to write reactive interfaces in a declarative and compositional style.
Flapjax is built on top of JavaScript. It runs on unmodified browsers and readily interoperates with existing JavaScript code. It is usable as either a programming language (that is compiled to JavaScript) or as a JavaScript library, and is designed for both uses. This paper presents the language, its design decisions, and illustrative examples drawn from several working Flapjax applications.
References
- Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, and John R. Douceur. Cooperative task management without manual stack management. In Proceedings of the 2002 Usenix Annual Technical Conference, 2002. Google Scholar
Digital Library
- OpenAjax Alliance. Successful deployment of Ajax and OpenAjax. http://www.openajax.org/whitepapers/Successful Deployment of Ajax and OpenAjax.php.Google Scholar
- Alan Hamilton Borning. The programming language aspects of ThingLab, a constraint-oriented simulation laboratory. ACM Transactions on Programming Languages and Systems, 3(4):353--387, 1981. Google Scholar
Digital Library
- Kimberley Burchett, Gregory H. Cooper, and Shriram Krishnamurthi. Lowering: A static optimization technique for transparent functional reactivity. In ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 71--80, 2007. Google Scholar
Digital Library
- Don Carney, Ugur Çetintemel, Mitch Cherniack, Christian Convey, Sangdon Lee, Greg Seidman, Michael Stonebraker, Nesime Tatbul, and Stan Zdonik. Monitoring streams - a new class of data management applications. In International Conference on Very Large Databases, pages 215--226, 2002. Google Scholar
Digital Library
- Paul Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice. LUSTRE: A declarative language for programming synchronous systems. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 178--188, 1987. Google Scholar
Digital Library
- Mitch Cherniack, Hari Balakrishnan, Magdalena Balazinska, Don Carney, Ugur Çetintemel, Ying Xing, and Stan Zdonik. Scalable distributed stream processing. In First Biennial Conference on Innovative Data Systems Research, 2003.Google Scholar
- Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web programming without tiers. In Formal Methods for Components and Objects, 2006. Google Scholar
Digital Library
- Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. The essence of form abstraction. In Asian Symposium on Programming Languages and Systems, 2008. Google Scholar
Digital Library
- Gregory H. Cooper. Integrating Dataflow Evaluation into a Practical Higher-Order Call-by-Value Language. PhD thesis, Brown University, 2008. Google Scholar
Digital Library
- Gregory H. Cooper and Shriram Krishnamurthi. Embedding dynamic dataflow in a call-by-value language. In European Symposium on Programming, pages 294--308, March 2006. Google Scholar
Digital Library
- Antony Courtney. Frappé: Functional reactive programming in Java. In Practical Aspects of Declarative Languages. Springer-Verlag, March 2001. Google Scholar
Digital Library
- Daniel Myers and Jennifer Carlisle and James Cowling and Barbara Liskov. MapJAX: Data Structure Abstractions for Asynchronous Web Applications. In Proceedings of the 2007 USENIX Annual Technical Conference, June 2007. Google Scholar
Digital Library
- Conal Elliott and Paul Hudak. Functional reactive animation. In ACM SIGPLAN International Conference on Functional Programming, pages 263--277, 1997. Google Scholar
Digital Library
- J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, and Alan Schmitt. Combinators for bidirectional tree transformations: A linguistic approach to the view update problem. ACM Transactions on Programming Languages and Systems, 29(3), May 2007. Google Scholar
Digital Library
- Bjorn N. Freeman-Benson and Alan Borning. Integrating constraints with an object-oriented language. In European Conference on Object-Oriented Programming, pages 268--286. Springer-Verlag, 1992. Google Scholar
Digital Library
- Jesse James Garrett. Ajax: A new approach to web applications. www.adaptivepath.com/ideas/essays/archives/000385.php.Google Scholar
- Arjun Guha, Shriram Krishnamurthi, and Trevor Jim. Using static analysis for Ajax intrusion detection. In International World Wide Web Conference, April 2009. Google Scholar
Digital Library
- Arjun Guha, Jacob Matthews, Robert Bruce Findler, and Shriram Krishnamurthi. Relationally-parametric polymorphic contracts. In Dynamic Languages Symposium, October 2007. Google Scholar
Digital Library
- Daniel Ignatoff, Gregory H. Cooper, and Shriram Krishnamurthi. Crossing state lines: Adapting object-oriented frameworks to functional reactive languages. In International Symposium on Functional and Logic Programming, pages 259--276, 2006. Google Scholar
Digital Library
- Christopher Grant Jones, Rose Liu, Leo Meyerovich, Krste Asanovic, and Rastislav Bodik. Parallelizing the web browser. In Proceedings of the First USENIX Workshop on Hot Topics in Parallelism, April 2009. Google Scholar
Digital Library
- Yit Phang Khoo, Michael Hicks, Jeffrey S. Foster, and Vibha Sazawal. Directing JavaScript with Arrows. In ACM SIGPLAN Dynamic Languages Symposium, 2009. Google Scholar
Digital Library
- Daniel R. Licata and Shriram Krishnamurthi. Verifying interactive Web programs. In IEEE International Symposium on Automated Software Engineering, pages 164--173, September 2004. Google Scholar
Digital Library
- Lambert Meertens. Designing constraint maintainers for user interaction, 1998. ftp://ftp.kestrel.edu/pub/papers/meertens/dcm.ps.Google Scholar
- Brad A. Myers. Separating application code from toolkits: Eliminating the spaghetti of call-backs. In ACM Symposium on User Interface Software and Technology, pages 211--220, November 1991. Google Scholar
Digital Library
- Brad A. Myers, Dario A. Giuse, Roger B. Dannenberg, David S. Kosbie, Edward Pervin, Andrew Mickish, Brad Vander Zanden, and Philippe Marchal. Garnet: Comprehensive support for graphical, highly interactive user interfaces. IEEE Computer, 23(11):71--85, 1990. Google Scholar
Digital Library
- Brad A. Myers, Richard G. McDaniel, Robert C. Miller, Alan S. Ferrency, Andrew Faulring, Bruce D. Kyle, Andrew Mickish, Alex Klimovitski, and Patrick Doane. The Amulet environment: New models for effective user interface software development. IEEE Transactions on Software Engineering, 23(6):347--365, 1997. Google Scholar
Digital Library
- Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In ACM SIGPLAN Workshop on Haskell, pages 51--64, 2002. Google Scholar
Digital Library
- David A. Patterson. The parallel computing landscape: a Berkeley view. In International Symposium on Low Power Electronics and Design, 2007. Google Scholar
Digital Library
- Manuel Serrano, Erick Gallesio, and Florian Loitsch. Hop: A language for programming the Web 2.0. In ACM SIGPLAN Dynamic Languages Symposium, October 2006.Google Scholar
- David Tarditi, Peter Lee, and Anurag Acharya. No assembly required: compiling Standard ML to C. ACM Letters on Programming Languages and Systems, 1(2):161--177, 1992. Google Scholar
Digital Library
- William Thies, Michal Karczmarek, and Saman Amarasinghe. StreamIt: A language for streaming applications. In International Conference on Compiler Construction, pages 179--196, 2002. Google Scholar
Digital Library
- W. W. Wadge and E. A. Ashcroft. Lucid, the dataflow programming language. Academic Press U.K., 1985. Google Scholar
Digital Library
Index Terms
Flapjax: a programming language for Ajax applications






Comments