9. Google to use HTML5 in Gmail Speed is a feature Goal is to get Gmail to load in under a second Offline support HTML5's database standards New features downloadurl: a new data transfer protocol HTML6 ??? Code size 443,000 lines of JavaScript 978,000 lines with comments 9
24. The DOCTYPE <!DOCTYPE html> Just 15 character HTML5 doc !!! Case-insensitive Backwards compatibility 24 How about Google page ? Is it based on the HTML5 ?
25. HTML5 Basic Structure Common structures Differentiation & Style. How about Semantic? What is the potential of new elements? E.g. Search engine, etc 25 [ HTML4] [ HTML5]
27. New Elements in HTML5 New Markup Elements – for better structure New Media Elements – for media content The Canvas Element – for drawing New Form Elements and Input type attribute values 27
28. New Markup Elements – for better structure <mark> for indicating text as marked or highlighted <time> for declaring the date and/or time within an HTML document. 28
29. New Markup Elements – for better structure <meter> for indicating a scalar measurement within a known range, or a fractional value <progress> for representing the progress of a task 29
39. HTML5 Features 39 Canvas / SVG Video / Audio Geolocation Offline web apps Web Socket Local Storage More features … Web SQL Database Web Workers
40. Canvas What is Canvas ? Dynamic and interactive graphics Draw images using 2D drawing API Lines, curves, shapes, fills, etc. Useful for Graphs, Applications, Games, etc. 40 [ http://canvaspaint.org/ ] [http://www.liquidx.net/plotkit/ ] [http://www.benjoffe.com/code/demos/canvascape/]
41.
42. Canvas Demo Appspot RectangleWave Canvascape - "Experimenting With Textures“ Depth of Field 42
50. Geolocation Geolocation API brings browser-based location to your apps 50 navigator.geolocation.getCurrentPosition( function(position) { var lat = position.coords.latitude; varlon = position.coords.longitude; showLocation(lat, lon); } );
51. Offline Web Apps Web apps need to work everywhere Database and app cache store user data and app resources locally 51
52. Offline Web Apps App Cache List resources that you want to take offline 52 cache.manifest file /static/stickies.html /media/deleteButton.png /media/deleteButtonPressed.png /css/stickies.css /js/stickies.js HTML file <body manifest="./cache.manifest"> </body>
53. Web SQL Database Databases right in the browser Around 5MB per domain Accessible across tabs and windows Based on SQLite Features: Transaction, SQL queries 53 var db = window.openDatabase("NoteTest", "1.0“, "Example DB“, 200000); function saveMe(id, text, timestamp, left, top, zIndex) { db.transaction( function (tx) { tx.executeSql( "INSERT INTO WebKitStickyNotes " + "(id, note, timestamp, left, top, zindex) " + "VALUES (?, ?, ?, ?, ?, ?)", [id, text, timestamp, left, top, zIndex]); } ); }
54. Web Storage Key/value pair (hash) storage Hash-based storage of strings (not objects). 10 MB per zone. Two kinds: sessionStorage: Die when browser closes Not shared between tabs localStorage Crash-safe Shared BW tabs / windows and sessions – but not zones. 54
55. Web Sockets TCP for the Web a next-generation bidirectional communication technology for web applications 55 if ("WebSocket" in window) {varws = new WebSocket("ws://example.com/service");ws.onopen = function() { // Web Socket is connected. You can send data by send() method.ws.send("message to send"); .... };ws.onmessage = function (evt) { varreceived_msg = evt.data; ... };ws.onclose = function() { // websocket is closed. };} else {// the browser doesn't support WebSocket.}
56. Web Sockets 구글 크롬 개발자 채널 버전 4.0.249.0. Web Socket을 기본기능으로 지원 Web Socket extension for Apache HTTP Server pywebsocket testing or experimental purposes mod_pywebsocket mod_python mod_ssl for wss http://code.google.com/p/pywebsocket/ jWebSocket http://jwebsocket.org/ 56
57. Web Sockets HTML5 Web Sockets and the Need for Speed! http://www.kaazing.com/blog/?p=301 http://bloga.jp/ws/jq/wakachi/mecab/wakachi.html ( Demo ) 57 The Web Sockets experience is 55 times faster than XHR
58. Web Workers API for running background scripts Threads for Web apps Browser Support Firefox 3.5 Safari 4 Chrome 4 Useful for gaming, graphics, crypto and etc. 58
59. Web Workers Workers ‘parent’ page 접근 제한 예제 59 The parent page <script> var worker = new Worker('worker.js'); worker.onmessage = function (event) { console.log('Results: ' + event.data); }; </script> worker.js function findPrimes() { // ... prime algorithm here postMessage(nextPrime); } findPrimes();
60. Web Workers and other Demos Motion Tracker (FF) Web Fonts File Drag and Drop (FF) 60
63. HTML5의 표준의 범위 Paul Cotton (HTML WG Co-chair) Interview 기본 입장 HTML 마크업내에서 활용되는 모든 API가 HTML5 표준의 범주 W3C 관련 WG HTML WG Web Application WG Device API WG Geolocation WG Media Annotation WG ? … 63
64. HTML5 표준화 현황 W3C WGs related with HTML5 HTML WG HTML5, HTML+RDFa, HTML Microdata, HTML Canvas 2D Context, HTML: The Markup Language, HTML5 diffs from HTML4, etc Web Applications WG Web Storage, Indexed Database API, File API, Server-Sent Event, Web Sockets API, Web Workers, Programmable HTTP Caching and Serving, Web SQL Database, etc Device APIs and Policy WG Calendar, Contact, Media Capture, Messaging, System Information, File Writer, Gallery, Powerbox, Application Launcher, etc Geolocation WG Geolocation API 64
65. W3C HTML WG Milestones ( This schedule was removed ) 2007-05 HTML5 and Web Forms 2.0 specs adopted as basis for review 2007-11 HTML Design Principles First Public Working Draft 2008-02 HTML5 First Public Working Draft 2010-01 HTML5 Last Call Working Draft 2010-12? HTML5 Candidate Recommendation 2012-01? HTML5 Proposed Recommendation 2012-03? HTML5 Recommendation Participants 407 group participants, 407 in good standing, 140 participants from 37 organizations 267 Invited Experts 65
74. HTML5에 대한 이슈 및 전망 이슈 브라우저 호환성, 브라우저 처리 속도, 개발도구, W3C의 표준화일정 등 전망 브라우저 경쟁에 따른 빠른 HTML5 활성화 예상 특히 모바일HTML5 앱 증가 예상 E.g. HTML5 Yahoo! Mail web app 다양한 애플리케이션 개발 시도 E.g. noVNC: HTML5 VNC Client 74
75. 이원석 (Wonsuk Lee)/선임연구원/Ph.D. ETRI 표준연구센터 서비스융합표준연구팀 W3C 대한민국 사무국 코디네이터/모바일 웹2.0 포럼 HTML5 AG 의장 W3C Media Annotation WG 에디터/ W3C Device API WG 에디터/ W3C HTML WG / W3C Web Application WG 멤버 Email: wslee@etri.re.kr, wslee@w3.org Phone: 042-860-4893, 010-5800-3997 75
76. References [brad Neuberg] Introduction to HTML5, http://codinginparadise.org/presentations/intro_html5.pdf [Mark Pilgrim] Dive into HTML5, http://diveintohtml5.org/ [Nabtron] New Elements introduced in HTML5, http://nabtron.com/new-elements-in-html5/1910/ [W3C HTML WG], http://www.w3.org/html/wg/ [W3C Web Applications WG], http://www.w3.org/2008/webapps/ 76