2014 yılının sonunda sonlandırılması beklenen HTML standardının 5. sürümü çoktandır tarayıcılar tarafından destekleniyor. HTML5 ile gelen Canvas, Websockets ve diğer özelliklerle nasıl daha canlı, daha Flash uygulamalarına benzer, web uygulamaları geliştirebileceğimizi inceledik.
6. Neden yeni bir HTML sürümü?
● oyun geliştirilmesi için mi?
● video için mi?
● 3d için mi?
● ...
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
7. HTML5 Tarihi
● 2004
○ WHATWG (Apple, Mozilla, Opera)
● 2006
○ W3C XHTML
● 2008
○ İlk versiyon
○ Firefox 3, sonra diğerleri
● 2010
○ Steve Jobs, Flash Andıçı
● 2014
○ Final
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
8. W3C (HTML5 Tarihi)
● 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> olayı
http://net.tutsplus.com/articles/general/a-brief-history-of-html5/
11. Jobs vs Adobe
● Kasım 2011
○ Adobe: Mobil ve TV için Flash olmayacak
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);
...
65. 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