ABSTRACT
The World Wide Web has evolved gradually from a document delivery platform to an architecture for distributed programming. This largely unplanned evolution is apparent in the set of interconnected languages and protocols that any Web application must manage. This paper presents Ur/Web, a domain-specific, statically typed functional programming language with a much simpler model for programming modern Web applications. Ur/Web's model is unified, where programs in a single programming language are compiled to other "Web standards" languages as needed; supports novel kinds of encapsulation of Web-specific state; and exposes simple concurrency, where programmers can reason about distributed, multithreaded applications via a mix of transactions and cooperative preemption. We give a tutorial introduction to the main features of Ur/Web and discuss the language implementation and the production Web applications that use it.
Supplemental Material
- J. Armstrong. Erlang -- a survey of the language and its industrial applications. In Proc. INAP, pages 16--18, 1996.Google Scholar
- D. Atkins, T. Ball, M. Benedikt, G. Bruns, K. Cox, P. Mataga, and K. Rehor. Experience with a domain specific language for form-based services. In Proc. DSL, 1997. Google ScholarDigital Library
- V. Balat. Ocsigen: typing Web interaction with Objective Caml. In Proc. ML Workshop, 2006. Google ScholarDigital Library
- V. Balat, J. Vouillon, and B. Yakobowski. Experience report: Ocsigen, a Web programming framework. In Proc. ICFP, pages 311--316. ACM, 2009. Google ScholarDigital Library
- G. Berry and M. Serrano. Hop and HipHop: Multitier web orchestration. In Proc. ICDCIT, pages 1--13, 2014.Google ScholarDigital Library
- S. Burckhardt, M. Fahndrich, P. de Halleux, S. McDirmid, M. Moskal, N. Tillmann, and J. Kato. It's alive! Continuous feedback in UI programming. In phProc. PLDI, pages 95--104. ACM, 2013. Google ScholarDigital Library
- J. Cheney, S. Lindley, and P. Wadler. A practical theory of language-integrated query. In Proc. ICFP, pages 403--416. ACM, 2013. Google ScholarDigital Library
- A. Chlipala. Ur: Statically-typed metaprogramming with type-level record computation. In Proc. PLDI, pages 122--133. ACM, 2010\natexlaba. Google ScholarDigital Library
- A. Chlipala. Static checking of dynamically-varying security policies in database-backed applications. In Proc. OSDI, pages 105--118, 2010\natexlabb. Google ScholarDigital Library
- A. S. Christensen, A. Müller, and M. I. Schwartzbach. Extending Java for high-level Web service construction. TOPLAS, 25 (6): 814--875, November 2003. Google ScholarDigital Library
- E. Cooper, S. Lindley, P. Wadler, and J. Yallop. Links: Web programming without tiers. In Proc. FMCO, pages 266--296, 2006. Google ScholarDigital Library
- E. Cooper, S. Lindley, P. Wadler, and J. Yallop. The essence of form abstraction. In Proc. APLAS, pages 205--220. Springer-Verlag, 2008. Google ScholarDigital Library
- E. E. Cooper and P. Wadler. The RPC Calculus. In Proc. PPDP, pages 231--242. ACM, 2009. Google ScholarDigital Library
- E. Czaplicki and S. Chong. Asynchronous functional reactive programming for GUIs. In Proc. PLDI, pages 411--422. ACM, 2013. Google ScholarDigital Library
- S. Ducasse, A. Lienhard, and L. Renggli. Seaside -- a multiple control flow Web application framework. In European Smalltalk User Group -- Research Track, 2004.Google Scholar
- A. Frisch. OCaml + XDuce. In Proc. ICFP, pages 192--200. ACM, 2006. Google ScholarDigital Library
- J. Gray. The transaction concept: Virtues and limitations (invited paper). In Proc. VLDB, pages 144--154, 1981. Google ScholarDigital Library
- T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In Proc. PPoPP, pages 48--60. ACM, 2005. Google ScholarDigital Library
- H. Hosoya, J. Vouillon, and B. C. Pierce. Regular expression types for XML. In Proc. ICFP, pages 11--22. ACM, 2000. Google ScholarDigital Library
- S. Krishnamurthi, P. W. Hopkins, J. McCarthy, P. T. Graunke, G. Pettyjohn, and M. Felleisen. Implementation and use of the PLT Scheme Web Server. Higher Order Symbol. Comput., 20 (4): 431--460, 2007. Google ScholarDigital Library
- A. Krishnamurthy, A. Mettler, and D. Wagner. Fine-grained privilege separation for Web applications. InProc. WWW, 2010. Google ScholarDigital Library
- H. M. Levy. Capability-Based Computer Systems. Butterworth-Heinemann, Newton, MA, USA, 1984. ISBN 0932376223. Google ScholarDigital Library
- D. MacQueen. Modules for Standard ML. In Proc. LFP, pages 198--207. ACM, 1984. Google ScholarDigital Library
- S. Maffeis, J. Mitchell, and A. Taly. Object capabilities and isolation of untrusted Web applications. In Proc. IEEE S&P, pages 125--140, 2010. Google ScholarDigital Library
- J. McCarthy. Automatically RESTful Web applications or, marking modular serializable continuations. In Proc. ICFP. ACM, 2009. Google ScholarDigital Library
- J. McCarthy and S. Krishnamurthi. Interaction-safe state for the Web. InProc. Scheme and Functional Programming, 2006.Google Scholar
- E. Meijer, B. Beckman, and G. Bierman. LINQ: Reconciling objects, relations and XML in the .NET framework. In Proc. SIGMOD, pages 706--706. ACM, 2006. Google ScholarDigital Library
- L. A. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: A programming language for Ajax applications. In Proc. OOPSLA, pages 1--20. ACM, 2009. Google ScholarDigital Library
- S. L. Peyton Jones and P. Wadler. Imperative functional programming. In Proc. POPL, pages 71--84. ACM, 1993. Google ScholarDigital Library
- D. R. K. Ports and K. Grittner. Serializable Snapshot Isolation in PostgreSQL. Proc. VLDB Endow., 5 (12): 1850--1861, Aug. 2012. Google ScholarDigital Library
- J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, 1999. ISBN 0-521-48089-2. Google ScholarDigital Library
- M. Serrano. Hop, a fast server for the diffuse web. In Proc. COORDINATION, pages 1--26. Springer-Verlag, 2009. Google ScholarDigital Library
- M. Serrano, E. Gallesio, and F. Loitsch. Hop, a language for programming the Web 2.0. In Proc. DLS, 2006.Google Scholar
- N. Shavit and D. Touitou. Software transactional memory. In Proc. PODC, pages 204--213. ACM, 1995. Google ScholarDigital Library
- N. Tillmann, M. Moskal, J. de Halleux, and M. Fahndrich. TouchDevelop: Programming cloud-connected mobile devices via touchscreen. In Proc. ONWARD, pages 49--60. ACM, 2011. Google ScholarDigital Library
- J. Vouillon. Lwt: A cooperative thread library. In Proc. ML Workshop, pages 3--12. ACM, 2008. Google ScholarDigital Library
- P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In Proc. POPL, pages 60--76. ACM, 1989. Google ScholarDigital Library
Index Terms
- Ur/Web: A Simple Model for Programming the Web
Recommendations
Ur: statically-typed metaprogramming with type-level record computation
PLDI '10Dependent types provide a strong foundation for specifying and verifying rich properties of programs through type-checking. The earliest implementations combined dependency, which allows types to mention program variables; with type-level computation, ...
An optimizing compiler for a purely functional web-application language
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional ProgrammingHigh-level scripting languages have become tremendously popular for development of dynamic Web applications. Many programmers appreciate the productivity benefits of automatic storage management, freedom from verbose type annotations, and so on. While ...
An optimizing compiler for a purely functional web-application language
ICFP '15High-level scripting languages have become tremendously popular for development of dynamic Web applications. Many programmers appreciate the productivity benefits of automatic storage management, freedom from verbose type annotations, and so on. While ...
Comments