Asynchronous programming in F# (QCon 2012)

2,602 views
2,499 views

Published on

Asynchronous programming on the server (using F# agents) and on the client (using Pit framework to translate F# to JavaScript).

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,602
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Asynchronous programming in F# (QCon 2012)

  1. 1. Asynchronous programming on the server and the client in F# Tomas Petricek @tomaspetricek
  2. 2. In Visual Studio since 2010
  3. 3. Asynchronous programmingOn the server side On the client side
  4. 4. Demo: Social drawing app
  5. 5. Demo: Social drawing appServer Agents Browser Client
  6. 6. Async on the ServerReactive programming without the inversion of control
  7. 7. Async on the ServerReactive model is important Node.js and C# 5.0F# asynchronous workflows Keep standard programming model Standard exception handling and loops Sequential and parallel composition
  8. 8. Agents and message-passingProtected * ( Behaviour + State )
  9. 9. F# and the BrowserF# and Silverlight Both compiler and libraries Interactive Try F#F# and JavaScript Translating since 2006! Open-source Pit, commercial WebSharper
  10. 10. Event handling in F#Data flow using combinatorsand control flow using async
  11. 11. Asynchronous GUIUser interactions = State machines
  12. 12. Asynchronous GUIUpdating rectangles Drawing rectangles waiting waiting up down after 500ms drawing
  13. 13. Asynchronous GUIUpdating rectangles Drawing rectangles waiting waiting up down after 500ms drawing move
  14. 14. What else is there?F# Interactive in your web browser www.tryfsharp.orgType providers in F# 3.0 Integrating data in the languageBridges an important mismatch Data and services use REST, XML, … Languages use types and objects
  15. 15. Type providers
  16. 16. Where to learn more?Functional and F# trainings http://functional-programming.net In London and New YorkFunctional Programming eXchange http://skillsmatter.com Next Friday (March 16th)
  17. 17. SummaryAsynchronous programming Writing non-blocking code Without the inversion of controlApplication areas Server-side – reactive request processing Client-side – encoding state machines

×