Académique Documents
Professionnel Documents
Culture Documents
Brad Neuberg
Developer Programs, Google
Chrome 2.0:
May 21, 2009
canvas
User Experience
XHR
CSS
DOM
HTML
native web
firefox 2.0-3.0
webkit
225
150
75
0
2002 2003 2004 2005 2006 2007 2008 2009
350
OSS Browser Users (M)
250
150
50
2005 2006 2007 2008 2009
60
100x improvement
in JavaScript performance
40
20
0
2001 2003 2005 2007 Q108 Q208 Q308 Q408 Q109
5>4
Wednesday, October 7, 2009
Cautionary Tales of Latent Lemonade
AJAX (2004)
xml (1998)
css xhr
(1996) (1999)
0
0 X
height
Y width
javascript:onClick(Draw());
15
<rect
15
<rect
x="0" y="0"
15
<rect
x="0" y="0"
width="100" height="100"
15
<rect
x="0" y="0"
width="100" height="100"
fill="blue" stroke="red"
15
<rect
x="0" y="0"
width="100" height="100"
fill="blue" stroke="red"
stroke-width="5px"
15
<rect
x="0" y="0"
width="100" height="100"
fill="blue" stroke="red"
stroke-width="5px"
rx="8" ry="8"
15
<rect
x="0" y="0"
width="100" height="100"
fill="blue" stroke="red"
stroke-width="5px"
rx="8" ry="8"
id="myRect" class="chart" />
15
<rect
x="0" y="0"
width="100" height="100"
fill="blue" stroke="red"
stroke-width="5px"
rx="8" ry="8"
id="myRect" class="chart" />
15
16
16
16
16
17
18
18
18
18
ctx.fillStyle = "rgb(200,0,0)";
18
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
18
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
18
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
18
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
18
20
20
20
video
geolocation
app cache
database
workers
27
27
27
27
<video controls>
<source src="foo.ogg" type="video/ogg">
<source src="foo.mp4">
Your browser does not support the video element.
</video>
28
<video controls>
<source src="foo.ogg" type="video/ogg">
<source src="foo.mp4">
Your browser does not support the video element.
</video>
var v = document.getElementsByTagName("video")[0];
v.play();
28
<video> demos
video
geolocation
app cache
database
workers
Places
2.1 mi
1.1 mi
500 ft
20 ft
75 ft
Wednesday, October 7, 2009
...And Browsers Are Now Location-Enabled
35
navigator.geolocation.getCurrentPosition(
35
navigator.geolocation.getCurrentPosition(
function(position) {
35
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
35
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
35
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
showLocation(lat, lon);
35
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
showLocation(lat, lon);
}
35
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
showLocation(lat, lon);
}
);
35
geolocation demos
video
geolocation
(iPhone)
app cache
database
workers
CACHE MANIFEST
/static/stickies.html
/media/deleteButton.png
/media/deleteButtonPressed.png
/css/stickies.css
/js/stickies.js
42
CACHE MANIFEST
/static/stickies.html
/media/deleteButton.png
/media/deleteButtonPressed.png
/css/stickies.css
/js/stickies.js
<body manifest="./cache.manifest">
</body>
42
44
44
44
44
44
44
44
44
44
44
44
44
44
44
44
video
geolocation
(iPhone)
app cache
(mobile)
database
(mobile)
workers
51
<script>
51
<script>
var worker = new Worker('worker.js');
51
<script>
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
51
<script>
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
console.log('Results: ' + event.data);
51
<script>
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
console.log('Results: ' + event.data);
};
51
<script>
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
console.log('Results: ' + event.data);
};
</script>
51
function findPrimes() {
// ... prime algorithm here
postMessage(nextPrime);
}
findPrimes();
52
video
geolocation
(iPhone)
app cache
(mobile)
database
(mobile)
workers
(mobile)
54