Building a better web

BEN SCHWARZ
    presents




BUILDING
  a better
  WEB
Building a better web
Building a better web
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
2.0
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
2.0                3.2       4.0
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
2.0                3.2       4.0                                                               4.01
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
XHTML1




                     2.0                3.2       4.0                                                               4.01
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
XHTML1




                                                                                 XHTML1.1




                     2.0                3.2       4.0                                                               4.01
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
XHTML1




                                                                                 XHTML1.1

                                                                                                                                                              HTML5




                     2.0                3.2       4.0                                                               4.01
          95


                     96


                                97


                                           98


                                                      99


                                                                 00


                                                                            01


                                                                                       02


                                                                                                  03


                                                                                                             04


                                                                                                                        05


                                                                                                                                   06


                                                                                                                                              07


                                                                                                                                                         08


                                                                                                                                                                    09


                                                                                                                                                                              10
       19


                  19


                             19


                                        19


                                                   19


                                                              20


                                                                         20


                                                                                    20


                                                                                               20


                                                                                                          20


                                                                                                                     20


                                                                                                                                20


                                                                                                                                           20


                                                                                                                                                      20


                                                                                                                                                                 20


                                                                                                                                                                            20
Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML.
This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They
made some good decisions, but poorly executed them. XHTML went nowhere.
Other people had noticed this also, take Mark Pilgrim, the author of diveintohtml5.org (The single best book for HTML that Iʼve read to date)
“The CSS working group
                     right now is chronically
                     dysfunctional…”

                                                    —Ian Hickson, Google, W3C, WHATWG




Mark isnʼt the only person to notice issues of the organisation that is the W3C. This from Ian Hickson, an invited chair to the CSS working group. (Which is somewhat of an honour to be a
part of)
Building a better web
I saw Bert Bos speak here at web directions around 3-5 years ago. One thing that he said while showing new css3 features was ʻfancy bordersʼ, this really stuck with me, he had no idea
what designers really wanted or needed. This stuck with me until now, although Iʼd never really thought about it
Some of you may have heard of the WHATWG…


An organisation, formed by individuals who work for companies like Opera, Apple and Mozilla
The whatwg go through the html5 spec with a fine tooth comb. Applying use cases and better documenting how browsers should handle elements down to a very detailed level.
Their work mirrors a copy of the html5 spec from the w3c—which is maintained using a version control system (subversion, I believe).
This tracker allows you to track every change to the spec, as it happens.#
Their work mirrors a copy of the html5 spec from the w3c—which is maintained using a version control system (subversion, I believe).
This tracker allows you to track every change to the spec, as it happens.#
If you wanted to keep in touch with developments, you can also check the @whatwg twitter
account#
If you wanted to keep in touch with developments, you can also check the @whatwg twitter
account#
Changing pace a little. Who knows what a spec is? (70% of the audience held up their hands). Who has read a spec (some hands down)... Like, from page 0—hero (all hands went down,
with the exception of Mike Smith [W3C] and a few others)
I did a word count of HTML4, it was about the size of a small novel that you could read over a weekend.
A common myth of HTML5 is that its a really big awful spec…
How horrible? Well, I couldnʼt copy and paste the text into Pages... my computer crashed for 7 long
minutes.#
I eventually wrote some javascript to get a rough word count. Remembering that this single page version of the spec omits certain pieces of web technology that would be considered
HTML5.
HTML5 is backwards compatible, donʼt break anything in existing browsers.
… but its still pretty hard to read a spec
because theyʼre designed for people who write browser rendering engines… not developers.
Not the millions of web designers and developers around the world, but just a couple hundred people on the face of the
planet.#
Not all is lost. Hixie and others have painstakingly gone through the spec and marked out all the sections that could be omitted… to create a web developer edition of the spec
Leading the charge on this is Mike™ Smith, a W3C representative from Tokyo, Japan. Who just happens to be a good friend of mine now…
Its about 50% of the size, which is much more palatable
FOR THE

                                                               LOVE
                                                                                     of
                                              THE WEB


A few months ago, I travelled the country (Australia, if youʼre wondering) and gave a bunch of HTML5/CSS3/Web technology workshops.
During this process of preparing for my workshops, I thought “Who really wants to read something that looks like this?”
“So, I’ve been trying to read [W3C]
specs more than ever. Not only is the
language used some form of
incompressible bullshit, but the
readability of these pages is
abysmal…”
“So, I’ve been trying to read [W3C]
specs more than ever. Not only is the
language used some form of
incompressible bullshit, but the
readability of these pages is
abysmal…”
                                  —Me
“…Why does a page have to look like
                  that ugly ass bullshit?”




This is taken from an e-mail to my long time friend, and business partner…
“…Why does a page have to look like
                  that ugly ass bullshit?”


                                                                             —Me




This is taken from an e-mail to my long time friend, and business partner…
AK. A classically trained chap, typographic genius.
ℜ
                                                                   ab+c
                                                                 ab-c.com.au




Together, we are ab+c, weʼre new, expect to hear more from us.
We sat down a bashed out a grease monkey script together, it added stylesheets and javascripts.
So rather than having something like this
We had this.
Within 3—4 hours Paul Irish had forked my code, corrected a cross domain @font-face issue found only in Firefox, then hosted the fonts on his own website.
Pause. Ajaxin.com wrote an article titled “W3C, Hire Ben Schwarz”
http://ajaxian.com/archives/w3c-hire-ben-schwarz-now-making-specs-nice-to-look-at
While this was great for my ego, after a few days of crazy traffic on my website, it died down after about a week. Nothing happened. Until…
I got an email introduction from Oli Studholme, (http://oli.jp, @boblet on twitter), he was the guy who got me in touch with Mike Smith. Without this email, none of the following could occur.
But what occurred?
Today, at Web directions south 2010, Iʼd like to introduce to you…
The all new HTML5, web developer edition. Mike Smith, sitting in the audience just deployed this as I started speaking to you
today#
Boom. The spec styles, only, running on a W3C domain
iPads, iPhones? Yeah we got views for those
too#
Today, its live here
Today, its live here
Building a better web
Building a better web
If you support this project, have feedback or anything of the sort, use this hash
tag#
"The problem we're facing right now
                 is there is already a lot of excitement
                 for HTML5, but it's a little too early to
                 deploy it because we're running into
                 interoperability issues,"

                                                           —Philippe Le Hegaret,
                                                    W3C interaction domain leader




Now, to recent events… Philippe was quoted saying
this#
“W3C: Hold off on deploying
                 HTML5 in websites”


                                                            —infoworld.com




Which was straight away misconstrued by lazy tech writers
“W3C Official: Don't Use HTML5 Yet”




                                                                                                               —dzone.com




Still, Iʼm not sure he said this at all. Fear tactics, not for politics, for a fucking web based technology.
<!DOCTYPE HTML>



Here is the HTML5 doctype, its beauiful, simple, sets your browser to use standards mode, and better still, it doesnʼt decide that youʼre using a “Version” of HTML.
Your browser determines the features that you can use, irregardless of which doctype youʼre using
So all these features, how do we know what we can do? Without breaking old browsers or giving them an “empty” experience?
Modernizr

Modernizr 1.7, coming soon with:
http://github.com/Modernizr/Modernizr/issues#issue/103
ş



Written by Faruk,

Paul says the pronunciation is “A-Tesh”. I left this on my slides, I hope I got it right Faruk, you charming looking bastard.
and my new best friend
“         hey is this ben schwartz you? <link>
              i'm sure there is only one ben schwarz in
              this world.
              i dated an erica schwartz in 6th grade.
              despite our matching necklaces, it turns out
              we weren’t Together Forever”

                                                                                                                —Paul Irish




Paul is a bit of a character, one day I returned to my computer to collect some missed IM messages from Paul.
Moving on. Modernizr detects support for all of these features
By adding class names to your html
element#
p	
  {	
  width:	
  33em;	
  }




So I can take my regular width for a paragraph of text (Note, 33em is usually about right for a sane ʻmeasureʼ [the width of the text])
.csscolumns	
  p	
  {	
  
                                              	
  	
  	
  width:	
  auto;	
  
                                              	
  	
  	
  column-­‐count:	
  2;
                                              	
  	
  	
  column-­‐gap:	
  1em;	
  	
  	
  	
  	
  	
  
                                              }




but when I have support for css3 columns, I can set the width to be auto and allow it to break into two short
columns#
.csscolumns	
  p	
  {	
  
                                            	
  	
  	
  width:	
  auto;	
  
                                            	
  	
  	
  	
  	
  	
  
                                            	
  	
  	
  -­‐webkit-­‐column-­‐count:	
  2;
                                            	
  	
  	
  -­‐moz-­‐column-­‐count:	
  2;
                                            	
  	
  	
  -­‐ms-­‐column-­‐count:	
  2;
                                            	
  	
  	
  -­‐o-­‐column-­‐count:	
  2;
                                            	
  	
  	
  column-­‐count:	
  2;

                                            	
  	
  	
  -­‐webkit-­‐column-­‐gap:	
  1em;
                                            	
  	
  	
  -­‐moz-­‐column-­‐gap:	
  1em;
                                            	
  	
  	
  -­‐ms-­‐column-­‐gap:	
  1em;
                                            	
  	
  	
  -­‐o-­‐column-­‐gap:	
  1em;
                                            	
  	
  	
  column-­‐gap:	
  1em;	
  	
  	
  	
  	
  	
  
                                            }

Sadly, this is really how I have to do it right now
You can achieve something like this—Which I have actually used on my new web site
germanforblack.com#
In a browser without css columns, you can offer the user a slightly different layout
.cssgradients	
  section	
  {	
  
    	
  	
  background-­‐image:	
  
    	
  	
  	
  	
  	
  -­‐webkit-­‐gradient(…,	
  …,	
  …,	
  
    	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  from(#33ff00),	
  
    	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  to(#ff00ff));
    }




You could use a css
gradient#
section	
  {	
  
 	
  	
  background-­‐image:	
  url("lame-­‐gradient.png");	
  
 }




and back down to loading an image (which obviously uses more bandwidth)
HOT
you can go and do aw/(ful|some) things like this. Hot pink to neon green.
Mobile devices are leading the web, we get one every year or two, even your mothers do. This means newer browsers on many devices, sadly the new windows 7 phone is going to also use
the IE7 rendering engine. This means no awesome features (shown following).
Firstly, HTML manifest
CACHE MANIFEST

                                  /
                                  /stylesheets/master.css
                                  /javascripts/application.js




If you have a file like this, your browser will cache /, master.css and application.js, so when your users are offline, they can literally type in “website.com” and get the full experience
CACHE MANIFEST

                             /
                             /stylesheets/master.css
                             /javascripts/application.js

                             NETWORK:
                             /exchange



We can say when we need network access
CACHE MANIFEST

                              /
                              /stylesheets/master.css
                              /javascripts/application.js

                              NETWORK:
                              /exchange

                              FALLBACK:
                              /people /unavailable-content

When we want to have something like a custom 404
CACHE MANIFEST

                             /
                             /stylesheets/master.css
                             /javascripts/*

                             NETWORK:
                             /exchange

                             FALLBACK:
                             /people /unavailable-content

Even * wildcards for paths
CACHE MANIFEST
                                           # Version 20

                                           /
                                           /stylesheets/master.css
                                           /images/icons/appicon.png
                                           /images/icons/appicon-x2.png
                                           /images/loading.png
                                           /images/btn-clear.png
                                           /images/btn-clear-x2.png
                                           /javascripts/json.js
                                           /javascripts/dataset.js
                                           /javascripts/application.js

                                           NETWORK:

                                           /exchange

Of course, if we updated master.css, by design the manifest will be checked, deemed that nothing has been changed and NOT redownload master.css. Do force a cache refresh, weʼll need
to somehow change the manifest file (see Version 20?—You could also use the commit hash from your version control system)
<!DOCTYPE HTML>
                                <html manifest=”site.manifest”>




Add the manifest file reference to an attribute called “manifest” on the HTML node
Content-Type: text/cache-manifest




Listen: YOU MUST DO THIS
That is, serve your manifest file with this content-type.
.htaccess




Using a htaccess
.htaccess




                   AddType text/cache-manifest manifest




Using a htaccess
/etc/mime.types




or editing mime.types if youʼve got access to it
/etc/mime.types


                            video/fli                          fli
                            video/gl                           gl
                            video/mpeg                         mpeg mpg mpe
                            video/mp4                          mp4
                            video/quicktime                    qt mov
                            text/cache-manifest                manifest




or editing mime.types if youʼve got access to it
js>                 applicationCache.status




You can also check the status of your manifest cache..


Idle - Nothing to be done
Checking - Downloading the manifest
Update Ready - The files have been downloaded, you can call swap cache
Obsolete - The manifest 404ʼd, the cache will be deleted
js>                 applicationCache.status                    0
                                                                        1
                                                                        2
                                                                        3
                                                                        4
                                                                        5


You can also check the status of your manifest cache..


Idle - Nothing to be done
Checking - Downloading the manifest
Update Ready - The files have been downloaded, you can call swap cache
Obsolete - The manifest 404ʼd, the cache will be deleted
js>                 applicationCache.status                    0   Uncached
                                                                        1   Idle
                                                                        2   Checking
                                                                        3   Downloading
                                                                        4   Update Ready
                                                                        5   Obsolete


You can also check the status of your manifest cache..


Idle - Nothing to be done
Checking - Downloading the manifest
Update Ready - The files have been downloaded, you can call swap cache
Obsolete - The manifest 404ʼd, the cache will be deleted
ffl

So, weʼve stored our app locally…
Earlier, there was a project called websql, in which we had a sqlite database that could be queried via javascript
Earlier, there was a project called websql, in which we had a sqlite database that could be queried via javascript
The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be
parsed and reentered into another sql database
The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be
parsed and reentered into another sql database
The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be
parsed and reentered into another sql database
JSON




The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be
parsed and reentered into another sql database
JSON




The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be
parsed and reentered into another sql database
Like, seriously.
Thankfully, the project has been stalled for well over a year.
localStorage
                                       sessionStorage



So, weʼre going to look at local and session storage, both have the exact same API and 5mb file size limit per domain. They are like a cookie in that they use a same domain policy for data
access
Here was a video demo that I canʼt extract from keynote, I showed different access to `localStorage`.
Mike Smith blogged a demo of this technology a while back, so check that out if youʼre interested. http://sideshowbarker.net/2009/02/09/examine-html5-localstorage-and-sessionstorage-
data-with-web-inspector/
var	
  currency	
  =	
  {
                               	
  	
  "AUD":{
                               	
  	
  	
  	
  "name":"Australian	
  Dollars",
                               	
  	
  	
  	
  "symbol":"$",
                               	
  	
  	
  	
  "rate_usd":0.9876
                               	
  	
  }
                               }




So say you had some data like this—Maybe youʼd transferred it over JSON from your web server
localStorage['rate'] = JSON.stringify(currency)




Any browser that has localStorage support also features a native JSON library. Here I turn the JSON into a string representation.
JSON.parse(localStorage['rate'])




and here, from storage I re-create an object
navigator.onLine




We can also tell when our users are “online”
Really though, navigator.online will tell you if your user is (probably) on a plane…
if(navigator.onLine) {
                    // ajax request
                  } else {
                    // maybe pull it from offline storage?
                  }




But I think we can agree, that we can combine these technologies and come up with interesting results
$(window).bind("offline", function() {
  $("body").addClass("offline");
});
body.offline	
  nav#main	
  {	
  opacity:	
  0.9;	
  }




like make those navigation items look dulled…
We know what users devices are capable of, so lets offer a holistic experience no matter who they are.
Here I told a story about my girlfriends kid brother, who was my best friend in the world after I brought a brand new PSP in HK a few years ago.

A month later, he had one, a week after that I came over to visit, he said something roughly like: ʻhey, so I downloaded some torrented games, cracked the firmware, what firmware are you
on?” Our experiences with new mobile devices are going to change us all, no matter where we come from.
“An interface is humane if it is
responsive to human needs and
considerate of human frailties.”


             —Jef Raskin, The Humane Interface
Iʼll leave you with this:

The W3C are documenters, not designers, they have no clients. The HTML5 spec is a modest specification—while they are working hard to ensure it does not become an act of fiction and is
well implemented, we, as designers and developers need to take the web for ourselves and build something truly powerful. As content producers we are some of the most powerful people in
the world, we can influence goverenment, save peoples lives in the case of a natural disaster and communicate like we never have before.
1 of 114

Recommended

Nokia Lifeblogging and theBlogging Phenomenon by
Nokia Lifeblogging and theBlogging PhenomenonNokia Lifeblogging and theBlogging Phenomenon
Nokia Lifeblogging and theBlogging PhenomenonBSI
526 views25 slides
Wellness & Consumer Driven Health Care by
Wellness & Consumer Driven Health CareWellness & Consumer Driven Health Care
Wellness & Consumer Driven Health Careguest00dbec2
320 views48 slides
AI Eng April 11 by
AI Eng April 11AI Eng April 11
AI Eng April 11Embraer RI
251 views53 slides
AIX and PowerVM Update by
AIX and PowerVM UpdateAIX and PowerVM Update
AIX and PowerVM UpdateAndrey Klyachkin
3.6K views42 slides
02 h.e. purnomo yusgiantoro by
02   h.e. purnomo yusgiantoro02   h.e. purnomo yusgiantoro
02 h.e. purnomo yusgiantorobocah666
388 views14 slides
Commissioner Bridget Gainer - Cook County Pension Fund 2011 Investment Return... by
Commissioner Bridget Gainer - Cook County Pension Fund 2011 Investment Return...Commissioner Bridget Gainer - Cook County Pension Fund 2011 Investment Return...
Commissioner Bridget Gainer - Cook County Pension Fund 2011 Investment Return...Cook County Commissioner Bridget Gainer
2.7K views6 slides

More Related Content

What's hot

Chemical Supply Chain by
Chemical Supply ChainChemical Supply Chain
Chemical Supply ChainNatashaS7
579 views17 slides
Fuel by
FuelFuel
FuelMichael Hudson
354 views5 slides
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate Planning by
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate PlanningWilson Family Wealth Goal Achiever - InKnowVision Advanced Estate Planning
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate PlanningInKnowVision
697 views75 slides
Citrix - Alternative For Server Virtualistion by
Citrix - Alternative For Server VirtualistionCitrix - Alternative For Server Virtualistion
Citrix - Alternative For Server Virtualistiondataplex systems limited
3.2K views24 slides
Pine Technical report: CDI versus TJLP, volatility versus trend by
Pine Technical report: CDI versus TJLP, volatility versus trendPine Technical report: CDI versus TJLP, volatility versus trend
Pine Technical report: CDI versus TJLP, volatility versus trendBanco Pine
288 views4 slides
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming) by
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)Betable
17.8K views34 slides

What's hot(6)

Chemical Supply Chain by NatashaS7
Chemical Supply ChainChemical Supply Chain
Chemical Supply Chain
NatashaS7579 views
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate Planning by InKnowVision
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate PlanningWilson Family Wealth Goal Achiever - InKnowVision Advanced Estate Planning
Wilson Family Wealth Goal Achiever - InKnowVision Advanced Estate Planning
InKnowVision697 views
Pine Technical report: CDI versus TJLP, volatility versus trend by Banco Pine
Pine Technical report: CDI versus TJLP, volatility versus trendPine Technical report: CDI versus TJLP, volatility versus trend
Pine Technical report: CDI versus TJLP, volatility versus trend
Banco Pine288 views
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming) by Betable
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)
It's an A.R.M.'s Race (Acquisition, Retention and Monetization in Mobile Gaming)
Betable17.8K views

Similar to Building a better web

Take back the web by
Take back the webTake back the web
Take back the webBen Schwarz
5.1K views38 slides
Roadmap For International Growth Final by
Roadmap For International Growth FinalRoadmap For International Growth Final
Roadmap For International Growth Finaljwdento3
1.2K views37 slides
Nationwide Insurance - Building an Effective Finance Control and Fast Book Cl... by
Nationwide Insurance - Building an Effective Finance Control and Fast Book Cl...Nationwide Insurance - Building an Effective Finance Control and Fast Book Cl...
Nationwide Insurance - Building an Effective Finance Control and Fast Book Cl...Business Intelligence Research
1.6K views26 slides
Wellness & Consumer Driven Health Care by
Wellness & Consumer Driven Health CareWellness & Consumer Driven Health Care
Wellness & Consumer Driven Health Careguest00dbec2
487 views48 slides
Wellness &amp; Consumer Driven Health Care by
Wellness &amp; Consumer Driven Health CareWellness &amp; Consumer Driven Health Care
Wellness &amp; Consumer Driven Health CareSmeaco
296 views48 slides
Samuel hbv lt ds 1- 2013 by
Samuel   hbv lt ds 1- 2013Samuel   hbv lt ds 1- 2013
Samuel hbv lt ds 1- 2013odeckmyn
296 views40 slides

Similar to Building a better web(20)

Take back the web by Ben Schwarz
Take back the webTake back the web
Take back the web
Ben Schwarz5.1K views
Roadmap For International Growth Final by jwdento3
Roadmap For International Growth FinalRoadmap For International Growth Final
Roadmap For International Growth Final
jwdento31.2K views
Wellness & Consumer Driven Health Care by guest00dbec2
Wellness & Consumer Driven Health CareWellness & Consumer Driven Health Care
Wellness & Consumer Driven Health Care
guest00dbec2487 views
Wellness &amp; Consumer Driven Health Care by Smeaco
Wellness &amp; Consumer Driven Health CareWellness &amp; Consumer Driven Health Care
Wellness &amp; Consumer Driven Health Care
Smeaco296 views
Samuel hbv lt ds 1- 2013 by odeckmyn
Samuel   hbv lt ds 1- 2013Samuel   hbv lt ds 1- 2013
Samuel hbv lt ds 1- 2013
odeckmyn296 views
Employment Tracker DC Metro: March 2012 by kottmeier
Employment Tracker DC Metro: March 2012Employment Tracker DC Metro: March 2012
Employment Tracker DC Metro: March 2012
kottmeier190 views
Measuring and Monitoring Foot and Mouth Disease Occurrence Melissa McLaws EuFMD by FAO
Measuring and Monitoring Foot and Mouth Disease Occurrence Melissa McLaws EuFMDMeasuring and Monitoring Foot and Mouth Disease Occurrence Melissa McLaws EuFMD
Measuring and Monitoring Foot and Mouth Disease Occurrence Melissa McLaws EuFMD
FAO2.2K views
Samuel virus lt du 2012 by odeckmyn
Samuel virus  lt du 2012Samuel virus  lt du 2012
Samuel virus lt du 2012
odeckmyn559 views
LEAR Q108presentation-z1x78ds by finance16
LEAR Q108presentation-z1x78dsLEAR Q108presentation-z1x78ds
LEAR Q108presentation-z1x78ds
finance16242 views
Regulations As a "Panacea": Exploring the Consequences by Mercatus Center
Regulations As a "Panacea": Exploring the ConsequencesRegulations As a "Panacea": Exploring the Consequences
Regulations As a "Panacea": Exploring the Consequences
Mercatus Center897 views
Crafting It Likmi by darwintjoe
Crafting It LikmiCrafting It Likmi
Crafting It Likmi
darwintjoe224 views
The Open Access movement gains momentum – should young scientists care? by Martin Ballaschk
The Open Access movement gains momentum – should young scientists care?The Open Access movement gains momentum – should young scientists care?
The Open Access movement gains momentum – should young scientists care?
Martin Ballaschk2.4K views
Cloudcomputingdsp ip-100123124450-phpapp02 by Lamouchi Bassem
Cloudcomputingdsp ip-100123124450-phpapp02Cloudcomputingdsp ip-100123124450-phpapp02
Cloudcomputingdsp ip-100123124450-phpapp02
Lamouchi Bassem1.4K views
It's An A.R.M.'s Race (Acquisition, Retention, and Monetization in Mobile Gam... by Brian Sapp
It's An A.R.M.'s Race (Acquisition, Retention, and Monetization in Mobile Gam...It's An A.R.M.'s Race (Acquisition, Retention, and Monetization in Mobile Gam...
It's An A.R.M.'s Race (Acquisition, Retention, and Monetization in Mobile Gam...
Brian Sapp4.4K views

Recently uploaded

Antimalarial agents-Medicinal Chemistry by
Antimalarial agents-Medicinal ChemistryAntimalarial agents-Medicinal Chemistry
Antimalarial agents-Medicinal ChemistryNarminHamaaminHussen
6 views27 slides
Scopic UX Design Test Task.pdf by
Scopic UX Design Test Task.pdfScopic UX Design Test Task.pdf
Scopic UX Design Test Task.pdfAtiqur Rahaman
302 views36 slides
Design System.pdf by
Design System.pdfDesign System.pdf
Design System.pdfAtiqur Rahaman
19 views20 slides
evidence .pptx by
evidence .pptxevidence .pptx
evidence .pptxnpgkddpbpd
10 views4 slides
Big Deal Curmel Moton Shirt by
Big Deal Curmel Moton ShirtBig Deal Curmel Moton Shirt
Big Deal Curmel Moton Shirtbrandshop1
9 views1 slide
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdf by
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdfIEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdf
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdfNirmalanGanapathy1
9 views36 slides

Recently uploaded(20)

Scopic UX Design Test Task.pdf by Atiqur Rahaman
Scopic UX Design Test Task.pdfScopic UX Design Test Task.pdf
Scopic UX Design Test Task.pdf
Atiqur Rahaman302 views
Big Deal Curmel Moton Shirt by brandshop1
Big Deal Curmel Moton ShirtBig Deal Curmel Moton Shirt
Big Deal Curmel Moton Shirt
brandshop19 views
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdf by NirmalanGanapathy1
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdfIEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdf
IEC 600068-2-39 ENVIROMENT TESTING COMBINED TEMPERATURE LOW HUMIDTY.pdf
StratPlanning Manual 220713.pdf by Lakewalk Media
StratPlanning Manual 220713.pdfStratPlanning Manual 220713.pdf
StratPlanning Manual 220713.pdf
Lakewalk Media15 views
Oregon Ducks 4 Spencer Webb Hoodie by brandshop1
Oregon Ducks 4 Spencer Webb HoodieOregon Ducks 4 Spencer Webb Hoodie
Oregon Ducks 4 Spencer Webb Hoodie
brandshop113 views
Design System in Figma A to Z.pdf by Atiqur Rahaman
Design System in Figma A to Z.pdfDesign System in Figma A to Z.pdf
Design System in Figma A to Z.pdf
Atiqur Rahaman22 views
217 Drive - All on upper.pptx by vidstor282
217 Drive - All on upper.pptx217 Drive - All on upper.pptx
217 Drive - All on upper.pptx
vidstor28215 views
SS25 Fashion Key Items trend book by Peclers Paris
SS25 Fashion Key Items trend bookSS25 Fashion Key Items trend book
SS25 Fashion Key Items trend book
Peclers Paris148 views
Sudden Deafness Design Document by wyfangherman
Sudden Deafness Design DocumentSudden Deafness Design Document
Sudden Deafness Design Document
wyfangherman48 views
Free World aids day Template from Best presentation design agency by slideceotemplates
Free World aids day Template from Best presentation design agencyFree World aids day Template from Best presentation design agency
Free World aids day Template from Best presentation design agency

Building a better web

  • 1. BEN SCHWARZ presents BUILDING a better WEB
  • 4. Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 5. 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 6. 2.0 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 7. 2.0 3.2 4.0 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 8. 2.0 3.2 4.0 4.01 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 9. XHTML1 2.0 3.2 4.0 4.01 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 10. XHTML1 XHTML1.1 2.0 3.2 4.0 4.01 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 11. XHTML1 XHTML1.1 HTML5 2.0 3.2 4.0 4.01 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 Looking back, there was a lot of innovation going on early in my career, I quickly realised that since I ʻwent proʼ that Iʼd been using the same damn version of HTML. This bothered me a fair bit. Looking at why: The W3C became increasingly interested in semantics and allowing publication of content on various devices, mobile, print, televisions. They made some good decisions, but poorly executed them. XHTML went nowhere.
  • 12. Other people had noticed this also, take Mark Pilgrim, the author of diveintohtml5.org (The single best book for HTML that Iʼve read to date)
  • 13. “The CSS working group right now is chronically dysfunctional…” —Ian Hickson, Google, W3C, WHATWG Mark isnʼt the only person to notice issues of the organisation that is the W3C. This from Ian Hickson, an invited chair to the CSS working group. (Which is somewhat of an honour to be a part of)
  • 15. I saw Bert Bos speak here at web directions around 3-5 years ago. One thing that he said while showing new css3 features was ʻfancy bordersʼ, this really stuck with me, he had no idea what designers really wanted or needed. This stuck with me until now, although Iʼd never really thought about it
  • 16. Some of you may have heard of the WHATWG…
  • 17.  An organisation, formed by individuals who work for companies like Opera, Apple and Mozilla
  • 18. The whatwg go through the html5 spec with a fine tooth comb. Applying use cases and better documenting how browsers should handle elements down to a very detailed level.
  • 19. Their work mirrors a copy of the html5 spec from the w3c—which is maintained using a version control system (subversion, I believe). This tracker allows you to track every change to the spec, as it happens.#
  • 20. Their work mirrors a copy of the html5 spec from the w3c—which is maintained using a version control system (subversion, I believe). This tracker allows you to track every change to the spec, as it happens.#
  • 21. If you wanted to keep in touch with developments, you can also check the @whatwg twitter account#
  • 22. If you wanted to keep in touch with developments, you can also check the @whatwg twitter account#
  • 23. Changing pace a little. Who knows what a spec is? (70% of the audience held up their hands). Who has read a spec (some hands down)... Like, from page 0—hero (all hands went down, with the exception of Mike Smith [W3C] and a few others)
  • 24. I did a word count of HTML4, it was about the size of a small novel that you could read over a weekend.
  • 25. A common myth of HTML5 is that its a really big awful spec…
  • 26. How horrible? Well, I couldnʼt copy and paste the text into Pages... my computer crashed for 7 long minutes.#
  • 27. I eventually wrote some javascript to get a rough word count. Remembering that this single page version of the spec omits certain pieces of web technology that would be considered HTML5.
  • 28. HTML5 is backwards compatible, donʼt break anything in existing browsers.
  • 29. … but its still pretty hard to read a spec
  • 30. because theyʼre designed for people who write browser rendering engines… not developers.
  • 31. Not the millions of web designers and developers around the world, but just a couple hundred people on the face of the planet.#
  • 32. Not all is lost. Hixie and others have painstakingly gone through the spec and marked out all the sections that could be omitted… to create a web developer edition of the spec
  • 33. Leading the charge on this is Mike™ Smith, a W3C representative from Tokyo, Japan. Who just happens to be a good friend of mine now…
  • 34. Its about 50% of the size, which is much more palatable
  • 35. FOR THE LOVE of THE WEB A few months ago, I travelled the country (Australia, if youʼre wondering) and gave a bunch of HTML5/CSS3/Web technology workshops.
  • 36. During this process of preparing for my workshops, I thought “Who really wants to read something that looks like this?”
  • 37. “So, I’ve been trying to read [W3C] specs more than ever. Not only is the language used some form of incompressible bullshit, but the readability of these pages is abysmal…”
  • 38. “So, I’ve been trying to read [W3C] specs more than ever. Not only is the language used some form of incompressible bullshit, but the readability of these pages is abysmal…” —Me
  • 39. “…Why does a page have to look like that ugly ass bullshit?” This is taken from an e-mail to my long time friend, and business partner…
  • 40. “…Why does a page have to look like that ugly ass bullshit?” —Me This is taken from an e-mail to my long time friend, and business partner…
  • 41. AK. A classically trained chap, typographic genius.
  • 42. ab+c ab-c.com.au Together, we are ab+c, weʼre new, expect to hear more from us.
  • 43. We sat down a bashed out a grease monkey script together, it added stylesheets and javascripts.
  • 44. So rather than having something like this
  • 45. We had this. Within 3—4 hours Paul Irish had forked my code, corrected a cross domain @font-face issue found only in Firefox, then hosted the fonts on his own website.
  • 46. Pause. Ajaxin.com wrote an article titled “W3C, Hire Ben Schwarz” http://ajaxian.com/archives/w3c-hire-ben-schwarz-now-making-specs-nice-to-look-at While this was great for my ego, after a few days of crazy traffic on my website, it died down after about a week. Nothing happened. Until…
  • 47. I got an email introduction from Oli Studholme, (http://oli.jp, @boblet on twitter), he was the guy who got me in touch with Mike Smith. Without this email, none of the following could occur. But what occurred?
  • 48. Today, at Web directions south 2010, Iʼd like to introduce to you…
  • 49. The all new HTML5, web developer edition. Mike Smith, sitting in the audience just deployed this as I started speaking to you today#
  • 50. Boom. The spec styles, only, running on a W3C domain
  • 51. iPads, iPhones? Yeah we got views for those too#
  • 56. If you support this project, have feedback or anything of the sort, use this hash tag#
  • 57. "The problem we're facing right now is there is already a lot of excitement for HTML5, but it's a little too early to deploy it because we're running into interoperability issues," —Philippe Le Hegaret, W3C interaction domain leader Now, to recent events… Philippe was quoted saying this#
  • 58. “W3C: Hold off on deploying HTML5 in websites” —infoworld.com Which was straight away misconstrued by lazy tech writers
  • 59. “W3C Official: Don't Use HTML5 Yet” —dzone.com Still, Iʼm not sure he said this at all. Fear tactics, not for politics, for a fucking web based technology.
  • 60. <!DOCTYPE HTML> Here is the HTML5 doctype, its beauiful, simple, sets your browser to use standards mode, and better still, it doesnʼt decide that youʼre using a “Version” of HTML.
  • 61. Your browser determines the features that you can use, irregardless of which doctype youʼre using
  • 62. So all these features, how do we know what we can do? Without breaking old browsers or giving them an “empty” experience?
  • 63. Modernizr Modernizr 1.7, coming soon with: http://github.com/Modernizr/Modernizr/issues#issue/103
  • 64. ş Written by Faruk, Paul says the pronunciation is “A-Tesh”. I left this on my slides, I hope I got it right Faruk, you charming looking bastard.
  • 65. and my new best friend
  • 66. hey is this ben schwartz you? <link> i'm sure there is only one ben schwarz in this world. i dated an erica schwartz in 6th grade. despite our matching necklaces, it turns out we weren’t Together Forever” —Paul Irish Paul is a bit of a character, one day I returned to my computer to collect some missed IM messages from Paul.
  • 67. Moving on. Modernizr detects support for all of these features
  • 68. By adding class names to your html element#
  • 69. p  {  width:  33em;  } So I can take my regular width for a paragraph of text (Note, 33em is usually about right for a sane ʻmeasureʼ [the width of the text])
  • 70. .csscolumns  p  {        width:  auto;        column-­‐count:  2;      column-­‐gap:  1em;             } but when I have support for css3 columns, I can set the width to be auto and allow it to break into two short columns#
  • 71. .csscolumns  p  {        width:  auto;                    -­‐webkit-­‐column-­‐count:  2;      -­‐moz-­‐column-­‐count:  2;      -­‐ms-­‐column-­‐count:  2;      -­‐o-­‐column-­‐count:  2;      column-­‐count:  2;      -­‐webkit-­‐column-­‐gap:  1em;      -­‐moz-­‐column-­‐gap:  1em;      -­‐ms-­‐column-­‐gap:  1em;      -­‐o-­‐column-­‐gap:  1em;      column-­‐gap:  1em;             } Sadly, this is really how I have to do it right now
  • 72. You can achieve something like this—Which I have actually used on my new web site germanforblack.com#
  • 73. In a browser without css columns, you can offer the user a slightly different layout
  • 74. .cssgradients  section  {      background-­‐image:            -­‐webkit-­‐gradient(…,  …,  …,                                              from(#33ff00),                                              to(#ff00ff)); } You could use a css gradient#
  • 75. section  {      background-­‐image:  url("lame-­‐gradient.png");   } and back down to loading an image (which obviously uses more bandwidth)
  • 76. HOT you can go and do aw/(ful|some) things like this. Hot pink to neon green.
  • 77. Mobile devices are leading the web, we get one every year or two, even your mothers do. This means newer browsers on many devices, sadly the new windows 7 phone is going to also use the IE7 rendering engine. This means no awesome features (shown following).
  • 79. CACHE MANIFEST / /stylesheets/master.css /javascripts/application.js If you have a file like this, your browser will cache /, master.css and application.js, so when your users are offline, they can literally type in “website.com” and get the full experience
  • 80. CACHE MANIFEST / /stylesheets/master.css /javascripts/application.js NETWORK: /exchange We can say when we need network access
  • 81. CACHE MANIFEST / /stylesheets/master.css /javascripts/application.js NETWORK: /exchange FALLBACK: /people /unavailable-content When we want to have something like a custom 404
  • 82. CACHE MANIFEST / /stylesheets/master.css /javascripts/* NETWORK: /exchange FALLBACK: /people /unavailable-content Even * wildcards for paths
  • 83. CACHE MANIFEST # Version 20 / /stylesheets/master.css /images/icons/appicon.png /images/icons/appicon-x2.png /images/loading.png /images/btn-clear.png /images/btn-clear-x2.png /javascripts/json.js /javascripts/dataset.js /javascripts/application.js NETWORK: /exchange Of course, if we updated master.css, by design the manifest will be checked, deemed that nothing has been changed and NOT redownload master.css. Do force a cache refresh, weʼll need to somehow change the manifest file (see Version 20?—You could also use the commit hash from your version control system)
  • 84. <!DOCTYPE HTML> <html manifest=”site.manifest”> Add the manifest file reference to an attribute called “manifest” on the HTML node
  • 85. Content-Type: text/cache-manifest Listen: YOU MUST DO THIS That is, serve your manifest file with this content-type.
  • 87. .htaccess AddType text/cache-manifest manifest Using a htaccess
  • 88. /etc/mime.types or editing mime.types if youʼve got access to it
  • 89. /etc/mime.types video/fli fli video/gl gl video/mpeg mpeg mpg mpe video/mp4 mp4 video/quicktime qt mov text/cache-manifest manifest or editing mime.types if youʼve got access to it
  • 90. js> applicationCache.status You can also check the status of your manifest cache.. Idle - Nothing to be done Checking - Downloading the manifest Update Ready - The files have been downloaded, you can call swap cache Obsolete - The manifest 404ʼd, the cache will be deleted
  • 91. js> applicationCache.status 0 1 2 3 4 5 You can also check the status of your manifest cache.. Idle - Nothing to be done Checking - Downloading the manifest Update Ready - The files have been downloaded, you can call swap cache Obsolete - The manifest 404ʼd, the cache will be deleted
  • 92. js> applicationCache.status 0 Uncached 1 Idle 2 Checking 3 Downloading 4 Update Ready 5 Obsolete You can also check the status of your manifest cache.. Idle - Nothing to be done Checking - Downloading the manifest Update Ready - The files have been downloaded, you can call swap cache Obsolete - The manifest 404ʼd, the cache will be deleted
  • 93. ffl So, weʼve stored our app locally…
  • 94. Earlier, there was a project called websql, in which we had a sqlite database that could be queried via javascript
  • 95. Earlier, there was a project called websql, in which we had a sqlite database that could be queried via javascript
  • 96. The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be parsed and reentered into another sql database
  • 97. The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be parsed and reentered into another sql database
  • 98. The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be parsed and reentered into another sql database
  • 99. JSON The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be parsed and reentered into another sql database
  • 100. JSON The idea was that weʼd have a browser, we would make a call to our server, using json. This would (probably) use a SQL database on the server side, transport it back using json, only to be parsed and reentered into another sql database
  • 101. Like, seriously. Thankfully, the project has been stalled for well over a year.
  • 102. localStorage sessionStorage So, weʼre going to look at local and session storage, both have the exact same API and 5mb file size limit per domain. They are like a cookie in that they use a same domain policy for data access
  • 103. Here was a video demo that I canʼt extract from keynote, I showed different access to `localStorage`. Mike Smith blogged a demo of this technology a while back, so check that out if youʼre interested. http://sideshowbarker.net/2009/02/09/examine-html5-localstorage-and-sessionstorage- data-with-web-inspector/
  • 104. var  currency  =  {    "AUD":{        "name":"Australian  Dollars",        "symbol":"$",        "rate_usd":0.9876    } } So say you had some data like this—Maybe youʼd transferred it over JSON from your web server
  • 105. localStorage['rate'] = JSON.stringify(currency) Any browser that has localStorage support also features a native JSON library. Here I turn the JSON into a string representation.
  • 106. JSON.parse(localStorage['rate']) and here, from storage I re-create an object
  • 107. navigator.onLine We can also tell when our users are “online”
  • 108. Really though, navigator.online will tell you if your user is (probably) on a plane…
  • 109. if(navigator.onLine) { // ajax request } else { // maybe pull it from offline storage? } But I think we can agree, that we can combine these technologies and come up with interesting results
  • 110. $(window).bind("offline", function() { $("body").addClass("offline"); });
  • 111. body.offline  nav#main  {  opacity:  0.9;  } like make those navigation items look dulled…
  • 112. We know what users devices are capable of, so lets offer a holistic experience no matter who they are. Here I told a story about my girlfriends kid brother, who was my best friend in the world after I brought a brand new PSP in HK a few years ago. A month later, he had one, a week after that I came over to visit, he said something roughly like: ʻhey, so I downloaded some torrented games, cracked the firmware, what firmware are you on?” Our experiences with new mobile devices are going to change us all, no matter where we come from.
  • 113. “An interface is humane if it is responsive to human needs and considerate of human frailties.” —Jef Raskin, The Humane Interface
  • 114. Iʼll leave you with this: The W3C are documenters, not designers, they have no clients. The HTML5 spec is a modest specification—while they are working hard to ensure it does not become an act of fiction and is well implemented, we, as designers and developers need to take the web for ourselves and build something truly powerful. As content producers we are some of the most powerful people in the world, we can influence goverenment, save peoples lives in the case of a natural disaster and communicate like we never have before.