Do I need to wait forthe specifications are complete?
Real-world browser support is what matters!
A desktop example http://www.pirateslovedaisies.com/
A mobile examplehttp://m.microsoft.com/windowsphone/en-us/demo/index.html
The current state of HTML5 support http://caniuse.com/
This presentation doesn’t cover• Semantics & Markups• HTML5 Forms• Web Workers• WebGL• CSS3• SVG• …
This presentation covers• Video• Canvas• WebSocket• Data Storage• Offline• FileSystem• Geolocation
MultimediaThese specifications defines the video/audio elements with all the availablemethods, attributes and events. Through the new APIs you can access, controland manipulate timeline data and network states of the files. With the comingadditions to the APIs you will be able to read and write raw data to audio files(Audio Data API) or manipulate captions in videos (Timed Track API).
CanvasThe canvas element provides scripts with a resolution-dependent bitmapcanvas, which can be used for rendering graphs, game graphics, or other visualimages on the fly.
WebSocketTo enable Web applications to maintain bidirectional communications withserver-side processes, this specification introduces the WebSocket interface.
WebSocket• WebSocket object• New protocol – ws://html5rocks.websocket.org/echo• Establishing an open connection – Client and server can send data at any time – Realtime web application
Web StorageThis specification introduces two related mechanisms, similar to HTTP sessioncookies, for storing structured data on the client side.
Web storage• Avoiding HTTP overhead of cookies• Key-value pairs• Local storage• Session storage• Quota – Needing user confirmation if exceeding storage capability
Indexed DatabaseThis specification defines APIs for a database of records holding simple valuesand hierarchical objects. Each record consists of a key and some value.Moreover, the database maintains indexes over records it stores. An applicationdeveloper directly uses an API to locate records either by their key or by using anindex. A query language can be layered on this API. An indexed database can beimplemented using a persistent B-tree data structure.
Indexed database• Object based data store• Asynchronous API• Execute commands and open cursor inside transactions
Opening indexed database
Creating an Object Store
Storing data into Object Store
Querying data by cursor
OfflineIn order to enable users to continue interacting with Web applications anddocuments even when their network connection is unavailable — forinstance, because they are traveling outside of their ISPs coverage area —authors can provide a manifest which lists the files that are needed for the Webapplication to work offline and which causes the users browser to keep a copyof the files for use offline.
FileSystemThis specification defines an API to navigate file system hierarchies, and definesa means by which a browser may expose sandboxed sections of a users localfile system to web applications.
File system• Sandboxed environment• Allow create/edit/delete files and directories
GeolocationThe Geolocation API defines a high-level interface to location informationassociated only with the device hosting the implementation, such as latitudeand longitude. The API itself is agnostic of the underlying location informationsources. Common sources of location information include Global PositioningSystem (GPS) and location inferred from network signals such as IP address,RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well asuser input. No guarantee is given that the API returns the devices actuallocation.
Geolocation• Allow users to share their location for location-aware services – Application >> Browser >> 3rd services such as Skyhook or Google• Privacy – Users are asked to share their location• navigator.geolocation – getCurrentPosition – watchPosition• Location metadata – latitude/longtitude/altitude – accuracy/altitudeAccuracy – heading/speed