Google country day_intervento
-
Upload
firenze-gtug -
Category
Technology
-
view
1.657 -
download
0
description
Transcript of Google country day_intervento
![Page 1: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/1.jpg)
6 Luglio 2011- Palazzo Corsini - Firenze
Alberto Mancini [email protected] Francesca [email protected]
![Page 2: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/2.jpg)
Target
Cercare di capire quanto le applicazioni "web" possono essere interattive
... senza flash
... senza applets
... senza plugins
HTML5: WebSockets
http://www.jooink.com
![Page 3: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/3.jpg)
Rules
• multi-user (almeno bi-)• applicazione 'semplice'• grafica banale • GWT• weekend-app (da sviluppare in un paio
di giorni)
![Page 4: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/4.jpg)
App
Simple Sample - PONG
![Page 5: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/5.jpg)
WebSocket
http://dev.w3.org/html5/websockets/ http://websocket.org/
"... a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket."
![Page 6: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/6.jpg)
WebSocket
HTTPServlet + public WebSocket doWebSocketConnect(HttpServletRequest r,...)interface Websocket { public onOpen(Connection cnt); public onClose(...);}interface Websocket.OnTextmessage { public void onMessage(String msg) }cnt.sendMessage(String msg)
8
var uri= "ws://...."var ws = new WebSocket(uri); ws.onmessage = function ...[onopen,onclose, onerror]ws.send(msg)
![Page 7: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/7.jpg)
WebSocket
HTTPServlet + public WebSocket doWebSocketConnect(HttpServletRequest r,...)interface Websocket { public onOpen(Connection cnt) public onClose(...)}interface Websocket.OnTextmessage { public void onMessage(String msg) }cnt.sendMessage(String msg)
8
var uri= "ws://...."var ws = new WebSocket(uri); ws.onmessage = function ...[onopen,onclose, onerror]ws.send(msg)
![Page 8: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/8.jpg)
schema
Case 1:
![Page 9: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/9.jpg)
schema
Case 2:
![Page 10: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/10.jpg)
pong
play !! :-)
jooink1.jooink.com/pong
![Page 11: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/11.jpg)
schema
Case 3:
![Page 12: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/12.jpg)
schema
Case 4:
![Page 13: Google country day_intervento](https://reader036.fdocumenti.com/reader036/viewer/2022081907/545c52a2af7959c3098b472f/html5/thumbnails/13.jpg)
That's allfolks !
That's all:-)
jooink1.jooink.com/pongjooink1.jooink.com/box2dTest