6. Why a new HTML?
● games?
● video?
● 3d?
● ...
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
7. HTML5 Chronology
● 2004
○ WHATWG (Apple, Mozilla, Opera)
● 2006
○ W3C XHTML
● 2008
○ First release
○ Firefox 3, and others
● 2010
○ Steve Jobs vs Flash
● 2014
○ Final
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
8. W3C (HTML5 Chronology)
● XHTML 2.0
○ No Backward Compability!
○ Strictly XML
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
9. WHAT WG
● 2004 W3C Workshop
● Backward Compatible
● Detailed Spec.
○ Non Strict HTML Parser
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
10. “The Web is, and should be, driven by technical merit, not consensus. The
W3C pretends otherwise, and wastes a lot of time for it. The WHATWG
does not.” – Ian Hickson
Benevolent Dictator for Life
<time> incidence
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
11. Jobs vs Adobe
● November 2011
○ Adobe: No Flash for Mobil and TV
http://en.wikipedia.org/wiki/Adobe_Flash
43. WebSocket (WebSocket onOpen)
import org.eclipse.jetty.websocket.WebSocket
public class GameSocket implements WebSocket,
WebSocket.OnTextMessage {
...
@Override
public void onOpen(Connection connection) {
this.connection = connection;
world.addSocket(this);
}
}
44. WebSocket (WebSocket onClose)
import org.eclipse.jetty.websocket.WebSocket
public class GameSocket implements WebSocket,
WebSocket.OnTextMessage {
...
@Override
public void onClose(int closeCode, String msg) {
world.removeSocket(this);
world.removePlayer(avatar.getId());
}
}
45. WebSocket (WebSocket onMessage)
import org.eclipse.jetty.websocket.WebSocket
public class GameSocket implements WebSocket,
WebSocket.OnTextMessage {
...
public void onMessage(String msg) {
try {
Map<String, String> attMap = getAttributeMap(msg);
String pathInfo = attMap.get("path");
if ("static".equals(pathInfo)) {
connection.sendMessage("static/" + staticGameMap);
} else if ("text".equals(pathInfo)) {
...
}
}
46. WebSocket (sockets)
public class AxeWorld extends TimerTask implements World {
...
public final Set<GameSocket> sockets;
@Override public void addSocket(GameSocket gameSocket)...
@Override public void removeSocket(GameSocket gameSocket)...
@Override
public void run() {...
for (GameSocket gs : sockets) {
gs.sendMessage(msg);
...
64. Manifest (FALLBACK)
# static.html will be served if main.py is inaccessible
# offline.jpg will be served in place of all images in
images/large/
# offline.html will be served in place of all other .html files
FALLBACK:
/main.py /static.html
images/large/ images/offline.jpg
*.html /offline.html
http://www.html5rocks.com