Wednesday, March 28, 2012

Ajax-style Client/Server Programming with F#

Ajax-style Client/Server Programming with F#Ajax-style Client/Server Programming with F# Tomáš Petříček & Don Syme Why are Web Applications Hard? Limited client-side environment - Only JavaScript (no client-side installation allowed!!!) Discontinuity between client and server side, Two parts of the same application! Components in web frameworks are only server-side No standard way for expressing client-side interactions Ajax-style Web Control Flow HTTP protocol is based on request-response principle Ajax-style Web Control Flow HTTP protocol is based on request-response principle

Ajax-style applications update the page dynamically using asynchronous requests What’s going on? Program is “authored” on the server-side But runs primarily on the client-side. No state on the server (except during callbacks) Program is “authored” in server-side language (e.g. Visual Basic or PHP). But the main point of this program is to generate a client-side program in JS Executing some (most) code as JavaScript is unavoidable Summary 1. Client asks server for page 2. Server gives back JavaScript 3. Client runs JavaScript 4. Client calls back server asynchronously 5. Server talks to database during callbacks 6. Server responds with updated DOM/JavaScript for client Project Aims 1) Single programming language - F# 2) Type-checked client & server code 3) Modality-checked client & server code 4) Be Realistic Integrate with ASP.NET (or Apache …) No client-side installation required Look forward (SilverLight, …) Related Work Volta (Erik Meijer et. al., Microsoft) Client side in .NET languages (by translating IL to JavaScript) Links Language (Philip Wadler et. al., University of Edinburgh) Single language for all three tires (client/server/database) Google Web Toolkit Client side in Java (by translating...

Website: tomasp.net | Filesize: 511kb
No of Page(s): 23
Download Ajax-style Client/Server Programming with F#.pdf

No comments:

Post a Comment