Tuesday, February 8, 2011

HTML 5 presentation by Scott Davis: ThirstyHead

Q. How many are are doing android dev A. 3 hands went up : Teacher eval, Qwest phone features, Time warner cable

Q. How many desktop A. 50%

Q. HTML5 A. no hands

Local Storage & Application Cache : Can be used for both desktop and mobile app, but mostly on mobile

HTML 5 : Dive into HTML5 by Mark Pilgrim by O’reilly free online at diveintohtml5.org

local storage

old style persistence : cookies disadvantage : turned off, small (4k), all cookies send back & forth with each request

Q. anyone playing with nosql A. no

local storage is name value pair : its like no sql. almost like hashmap 5 MB storage for each origin

localStorage["name"] = value
localStorage["name2"] = value2
for(var i=0; i<localStorage.length; i++)
    var key = localStrorage.key(i)
    var value = localStorage.getItem(key);

Typical usage: we can store facebook updates, twitter updates on the local storage when your phone is in airplane mode. when we go online the updates from local storage is submitted.

today most TV guide are java1.1 or embedded C, most TV manufacture are converting to HTML5 and will use local storage to persist it.

There is also session storage for the current session.

polyfill : polymorphically backfilling the brower that doesnt provide the functionality that browser should support natively. there are polyfill aviable for localStorage ay github

WebSql

no support in IE (as its GPL), firefox due to develop aesthetics : sql is last gen, localStorage keyvalue

can open a db and run sql database. but not on IE or firefox, that makes it not go anywhere

storage is 25 MB

Question : how do we clear the storage, or age out after time like cookies Answer : cant age out, but can clear via offline storage : (firefox - advanced:network)

Question : shared across tabs Answer : yes

Application Cache

all requests are sent to cache and then rendered. all subsequest request hit the browser cache first

cache is king when it comes to writing performant code

great tutorial : Caching tutorial : http://www.mnot.net/cache_docs/ great book : High Performance web sites : recoomendation in books implemented in tool YSlow http://developer.yahoo.com/yslow/

App cache will be supported in IE9, not in IE 8, but in all browser including in iphone and android

html5rocks.com : great site for all things html5

html 5 uses server side hints

manifest file: text - non xml etc file is named as .manifest has 3 sections in any order : CACHE, NETWORK, FALLBACK
the session can appear multiple times

cache : cache things listed here network : users has to be online fallback : show alternate pages to be shown when user is offline

application cache also gets 5 MB

No comments:

Post a Comment