The document discusses using server-sent events (SSE) with HTML5 to push data from a server to a client browser. It provides tools and guidelines for a project to build a TODO list application that uses SSE to continuously update the list of TODOs in the browser. The project skeleton outlines the TODOs API on the server and resources for further information on SSE and localStorage APIs used in the project.
3. Server Sent Event
Client Server
request
response
Update
response Update
With%streaming,%the%browser%sends%a%complete%request,%but%the%server%
maintains%an%open%response%that%is%con8nuously%updated %
Saturday, November 17, 12
18. The Web API
http://<MY-IP-ADDRESS>:3000/
• GET /todos
• Return all todos • GET /stream
• POST /todos • New todos stream
• Create a new todo
Saturday, November 17, 12
19. Resources
• About Server Sent Event:
https://developer.mozilla.org/en-US/docs/
Server-sent_events/Using_server-sent_events
• About localStorage:
https://developer.mozilla.org/en-US/
docs/DOM/Storage
Saturday, November 17, 12
20. For the fastest ones
• Add the Meta Viewport and test it with a
Mobile Browser (Opera Mobile Emulator)
http://dev.opera.com/articles/view/an-
introduction-to-meta-viewport-and-viewport/
• Make your code modular and use
RequireJS !
Saturday, November 17, 12
21. Need help ?
• If you are stuck or have any questions:
• Renaud
• Marc
• Adrien
• And me (Brice)
Saturday, November 17, 12