10.1145/1640089.1640091acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Flapjax: a programming language for Ajax applications

Published:25 October 2009Publication History

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

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. OpenAjax Alliance. Successful deployment of Ajax and OpenAjax. http://www.openajax.org/whitepapers/Successful Deployment of Ajax and OpenAjax.php.Google ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle Scholar
  8. Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web programming without tiers. In Formal Methods for Components and Objects, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. The essence of form abstraction. In Asian Symposium on Programming Languages and Systems, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Gregory H. Cooper. Integrating Dataflow Evaluation into a Practical Higher-Order Call-by-Value Language. PhD thesis, Brown University, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. Antony Courtney. Frappé: Functional reactive programming in Java. In Practical Aspects of Declarative Languages. Springer-Verlag, March 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. Conal Elliott and Paul Hudak. Functional reactive animation. In ACM SIGPLAN International Conference on Functional Programming, pages 263--277, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jesse James Garrett. Ajax: A new approach to web applications. www.adaptivepath.com/ideas/essays/archives/000385.php.Google ScholarGoogle Scholar
  18. Arjun Guha, Shriram Krishnamurthi, and Trevor Jim. Using static analysis for Ajax intrusion detection. In International World Wide Web Conference, April 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Arjun Guha, Jacob Matthews, Robert Bruce Findler, and Shriram Krishnamurthi. Relationally-parametric polymorphic contracts. In Dynamic Languages Symposium, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. Yit Phang Khoo, Michael Hicks, Jeffrey S. Foster, and Vibha Sazawal. Directing JavaScript with Arrows. In ACM SIGPLAN Dynamic Languages Symposium, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Daniel R. Licata and Shriram Krishnamurthi. Verifying interactive Web programs. In IEEE International Symposium on Automated Software Engineering, pages 164--173, September 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lambert Meertens. Designing constraint maintainers for user interaction, 1998. ftp://ftp.kestrel.edu/pub/papers/meertens/dcm.ps.Google ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In ACM SIGPLAN Workshop on Haskell, pages 51--64, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. David A. Patterson. The parallel computing landscape: a Berkeley view. In International Symposium on Low Power Electronics and Design, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle Scholar
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. William Thies, Michal Karczmarek, and Saman Amarasinghe. StreamIt: A language for streaming applications. In International Conference on Compiler Construction, pages 179--196, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. W. W. Wadge and E. A. Ashcroft. Lucid, the dataflow programming language. Academic Press U.K., 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Flapjax: a programming language for Ajax applications

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!