13
6 Luglio 2011- Palazzo Corsini - Firenze Alberto Mancini [email protected] Francesca Tosi [email protected]

Google country day_intervento

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Google country day_intervento

6 Luglio 2011- Palazzo Corsini - Firenze

Alberto Mancini [email protected] Francesca [email protected]

Page 2: Google country day_intervento

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

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

App

Simple Sample - PONG

Page 5: Google country day_intervento

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

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

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

schema

Case 1:

Page 9: Google country day_intervento

schema

Case 2:

Page 10: Google country day_intervento

pong

play !! :-)

jooink1.jooink.com/pong

Page 11: Google country day_intervento

schema

Case 3:

Page 12: Google country day_intervento

schema

Case 4:

Page 13: Google country day_intervento

That's allfolks !

That's all:-)

jooink1.jooink.com/pongjooink1.jooink.com/box2dTest