^ contentPlace:"3-3"
HTML5 and the Chrome Web Store
Michael Mahemoff
http://creativebits.org/files/html5-logo-1.jpg
http://j.mp/html5pl
http://creativebits.org/files/html5-logo-1.jpg
^ contentPlace:"3-3"
The other HTML5 slides
http://slides.html5rocks.com/
http://chenwangdesign.com/wordpress/wp-content/uploads/2010/12/Picture-1.png
^ contentPlace:"3-3"
Developer Relations at Google
http://img.technospot.net/Google-Product-API-Periodic-Table.jpg
^ contentPlace:"3-3"
Web Programming: Let's start in the '90s
http://prez.mahemoff.com/gtug-webstore/static/images/spice.jpg
Dark Ages of Web Programming: Black Art
http://upload.wikimedia.org/wikipedia/commons/b/b6/French-gendarme.jpg
http://prez.mahemoff.com/gtug-webstore/static/images/1997-hotmail.png
^ contentPlace:"3-3"
Talk to the cloud?
http://reason.com/assets/mc/tcavanaugh/arnoldtalktohand.jpg
^ contentPlace:"1-1"
Ajax Era: Established Practice
http://farm3.static.flickr.com/2112/2368225695_7f87aaedba.jpg
http://farm6.static.flickr.com/5308/5609334490_928e4b0d18_o.jpg http://flickr.com/photos/37184970@N00/5609334490/
^ contentPlace:"1-1"
HTML5 Era: Application Platform
http://creativebits.org/files/html5-logo-1.jpg
Input
Output
Networking
Offline
...
Input
#000
The old thing: Forms and links
http://farm1.static.flickr.com/231/463462503_73dc732315_b.jpg http://www.flickr.com/photos/badwsky/463462503/lightbox/
window.addEventListener('deviceorientation', function(ev) { ... }
ev.alpha | ev.beta | ev.gamma [z,x,y]
http://bit.ly/jsorientation
http://farm5.static.flickr.com/4111/5609063459_5a44d3a5b3_o.jpg http://flickr.com/photos/37184970@N00/5609063459/
Geolocation
http://farm5.static.flickr.com/4088/4988803970_2f68d61c8e.jpg
Geolocation
====
navigator.geolocation.getCurrentPosition
(
function(position) {
// position.coords.latitude,
// position.coords.longitude
// ...
},
errorHandler,
options
);
====
Speech
====
<input x-webkit-speech />
====
Device API Input: Microphone
http://farm5.static.flickr.com/4142/4880170082_33d603dd10_b.jpg http://www.flickr.com/photos/rustysheriff/4880170082/sizes/l/in/photostream/
Device API Input: Camera
http://farm2.static.flickr.com/1113/5152413649_5b31df3a58_o.jpg http://www.flickr.com/photos/mrmayo/5152413649/
Device API is here!
http://www.buzyblog.com/wp-content/uploads/2011/03/Motorola-Xoom.jpg
Output
#000
The old thing: text and images
http://farm5.static.flickr.com/4090/4988850098_f96f2c4d41_b.jpg http://www.flickr.com/photos/myoldpostcards/4988850098/sizes/l/in/photostream/
Output: CSS3
#000
CSS3
====
border-radius: 20px;
background: -webkit-linear-gradient(top,#cfc,#080);
-webkit-transform: rotate(-20deg);
-webkit-box-shadow: -30px -30px 15px #300;
====
CSS3
====
@font-face {
font-family: "Cantal";
src: url("cantal.ttf");
}
h1 { font-family: "Cantal", "Georgia", serif; }
====
Google Web Fonts
Output: Canvas
#000
Canvas
====
<canvas id="painting" width="300" height="300></canvas>
var canvas = document.querySelector("canvas");
var context = canvas.getContext("2d");
context.fillStyle = "rgb(100,100,100)";
context.fillRect(50,50,200,200);
====
^ contentPlace:"3-2"
Canvas + Favicon = Gold
http://www.mattwardman.com/blog/wp-content/uploads/2008716-arcade-game-in-your-favicon-big-screendump.gif
Actually useful
http://3.bp.blogspot.com/_ZaGO7GjCqAI/THOic8LCbtI/AAAAAAAAdFI/24IbFm7PD5I/s640/google-calendar-favicon-2010.png
Output: WebGL
Output: HTML Video
----
----
Output: HTML Video
====
<video src="bunny.webm" controls></video>
video.play();
video.pause();
console.log(video.duration, video.currentTime);
video.ontimeupdate = function() { ... }
====
Canvas-Video Mashup
http://static.uxebu.com/tobeytailor/gdd/#slide1
http://img.skitch.com/20101110-miq2kkqutmmrcmhwe92qs3xxtu.jpg
Video to Canvas
====
video.addEventListener("play", function(){
canvas.drawImage(video,0,0,500,500);
});
// see http://html5doctor.com/video-canvas-magic/
====
Reading video
http://farm6.static.flickr.com/5060/5450465337_9dff430ab9_o.jpg
Output: Audio
----
----
====
<audio src="song.mp3" controls></audio>
====
Output: HTML5 Notifications
http://maxcdn.googletutor.netdna-cdn.com/wp-content/uploads/2011/01/gmail-desktop-notification-1.png
Example: TweetDeck
http://1.bp.blogspot.com/_ca9gBiJ8CGc/TP-cu8XqQxI/AAAAAAAACrU/eOSfGqqNyL4/s1600/chromeDeck.jpg
HTML5 Notifications
====
if (available() && userPermission()) {
window.webkitNotifications.createNotification(
"icon.png",
"notification title",
"notification content"
);
}
====
Input
Output
Beyond User Interface
http://farm4.static.flickr.com/3010/3037590031_4f2eeb0b40_b.jpg http://flickr.com/photos/philgyford/3037590031/
WebSocket
====
conn = new WebSocket("ws://localhost:8000/test");
conn.send(video.currentTime)
conn.onmessage = function (ev) { ... }
====
Push Notifications: Chrome To Phone
http://androidandme.com/wp-content/uploads/2010/07/chrome-to-phone.jpg
Working offline
http://prez.mahemoff.com/wd-offline/images/farm3.static.flickr.com__2485__3759228220_4e039da0d4_b.jpg http://www.flickr.com/photos/pmiaki/3759228220/sizes/l/in/photostream/
Client-side storage - Local Storage, Web SQL, Indexed Database
http://prez.mahemoff.com/wd-offline/images/farm3.static.flickr.com__2485__3759228220_4e039da0d4_b.jpg http://www.flickr.com/photos/pmiaki/3759228220/sizes/l/in/photostream/
File Access
http://prez.mahemoff.com/wd-offline/images/farm3.static.flickr.com__2485__3759228220_4e039da0d4_b.jpg http://www.flickr.com/photos/pmiaki/3759228220/sizes/l/in/photostream/
Reading a File
====
<input type="file">
var reader = new FileReader();
reader.onload = function() { ... }
fileInput.onchange = function(ev) {
reader.readAsBinaryString(ev.target.files[0]);
}
====
File System
http://prez.mahemoff.com/wd-offline/images/farm3.static.flickr.com__2485__3759228220_4e039da0d4_b.jpg http://www.flickr.com/photos/pmiaki/3759228220/sizes/l/in/photostream/
FileSystem
====
var fs = window.requestFileSystem(...);
fs.root.getFile('log.txt', {create: true});
====
Application Cache
http://3.ly/timer
http://prez.mahemoff.com/wd-offline/images/farm3.static.flickr.com__2485__3759228220_4e039da0d4_b.jpg http://www.flickr.com/photos/pmiaki/3759228220/sizes/l/in/photostream/
^ contentPlace:"3-3"
Offline for performance too
New York Times
http://gilsmethod.wpengine.netdna-cdn.com/wp-content/uploads/2010/12/chrome-os-apps-new-york-times.png
^ contentPlace:"1-3"
Single Page Apps
http://farm6.static.flickr.com/5134/5514514134_1b02340eb3_o.jpg http://flickr.com/photos/37184970@N00/5514514134/
http://farm5.static.flickr.com/4105/5450664389_82de9057ce_b.jpg
History API
====
history.pushState(
{search: "rainbows"},
"Everything Rainbow",
"/search/rainbows"
);
window.onpopstate = function(ev) {
// URL changed - update UI
}
====
Demo: http://rampage.mahemoff.com
Source: https://github.com/mahemoff/rampage
http://www.consoleclassix.com/info_img/Rampage_NES_ScreenShot1.jpg
The Curl Test
====
curl http://rampage.mahemoff.com/monsters/george
...
<body>
<h1><a href="/">Know Your Rampage</a></h1>
<div id="main">
<h2><a href="/monsters">monsters</a> > George</h2>
<img src="/images/george.jpg" />
<div>Eats men</div>
<div>Born 1986</div>
</div>
...
====
^ contentPlace:"3-3"
The Search Engine Test
http://farm6.static.flickr.com/5213/5515831794_dfff3a174a_o.jpg http://flickr.com/photos/37184970@N00/5515831794/
^ contentPlace:"3-3"
HTML5 Everywhere: Write Once, Run Anywhere
http://farm4.static.flickr.com/3323/3624769121_225c4d592b.jpg http://flickr.com/photos/urosvelickovic/3624769121/
Form Factors
http://farm3.static.flickr.com/2397/1983337986_ff8ab0fdf7_o.jpg http://flickr.com/photos/williamhook/1983337986/
Form Factors
http://www.pcpro.co.uk/blogs/wp-content/uploads/2010/09/Samsung-Galaxy-Tab-in-hand-FPS-game.jpg http://www.pcpro.co.uk/blogs/2010/09/03/samsung-galaxy-tab-review-first-look/
Form Factors
http://thecoolgadgets.com/wp-content/uploads/2010/09/fascinations-usb-desktop-aquarium.jpg
Feature Detection
Progressive Enhancement
Responsive Web Design
http://farm3.static.flickr.com/2397/1983337986_ff8ab0fdf7_o.jpg http://flickr.com/photos/williamhook/1983337986/
^ contentPlace:"3-1"
Smartphone Markets
http://androidcommunity.com/blog/wp-content/uploads/2008/08/android_market_4.png
^ contentPlace:"3-1"
PhoneGap, Titanium
http://phonegap.com/apps
http://build.phonegap.com
http://apparat.io
http://farm5.static.flickr.com/4081/5017980645_7d997740a1_b.jpg
Apparatio
http://farm6.static.flickr.com/5211/5413812878_e6c8da5dcb_o.jpg http://flickr.com/photos/37184970@N00/5413812878/
Mobile UI toolkits
jQuery Mobile, Sencha Touch, jQTouch,
Zepto, iUI, JoApp ...
http://www.pdroms.de/media/upload/images/news/20090304_Missed_Reminder_v0.9.3_(Android_Application).png
Which takes us to the Web Store ...
http://farm6.static.flickr.com/5174/5466843010_a789499793_o.jpg http://flickr.com/photos/37184970@N00/5466843010/
Learn More: http://html5rocks.com
Readiness: http://chromestatus.com | http://caniuse.com
Slides: http://prez.mahemoff.com/gtug-pl-html5
Mail: mahemoff@google.com
Twitter: mahemoff