state of ajax zend con 08

88
State of Ajax Dion Almaer and Ben Galbraith Co-founders, Ajaxian.com

Upload: bgalbs

Post on 31-Oct-2014

11 views

Category:

Technology


0 download

DESCRIPTION

Presentation given at ZendCon 08 and Web 2.0 Expo NYC 2008 by Ben Galbraith and Dion Almaer. The presentation includes a lot of embedded videos and transitions and the slides are meant to support a spoken narrative, not replace it. Still, these are provided by request and I hope they'll be of help.

TRANSCRIPT

Page 1: State Of Ajax   Zend Con 08

State of AjaxDion Almaer and Ben GalbraithCo-founders, Ajaxian.com

Page 2: State Of Ajax   Zend Con 08
Page 3: State Of Ajax   Zend Con 08
Page 4: State Of Ajax   Zend Con 08
Page 5: State Of Ajax   Zend Con 08
Page 6: State Of Ajax   Zend Con 08
Page 7: State Of Ajax   Zend Con 08
Page 8: State Of Ajax   Zend Con 08
Page 9: State Of Ajax   Zend Con 08
Page 10: State Of Ajax   Zend Con 08

“Google Suggest and Google Maps are two

examples of a new approach to web applications that we at

Adaptive Path have been callingAjax. The name is shorthand for Asynchronous JavaScript + XML, and it represents a fundamental

shift in what’s possible on the Web.”

Jesse James GarrettCo-founder, Adaptive Path

Designer!

Page 11: State Of Ajax   Zend Con 08

Compelling User Experience

Page 12: State Of Ajax   Zend Con 08

Make Your User’s Happy

Page 13: State Of Ajax   Zend Con 08
Page 14: State Of Ajax   Zend Con 08

ExpectationsManaging

Page 15: State Of Ajax   Zend Con 08
Page 16: State Of Ajax   Zend Con 08

Top Grossing Film of 1957 Top Grossing Film of 2007

Page 17: State Of Ajax   Zend Con 08
Page 18: State Of Ajax   Zend Con 08
Page 19: State Of Ajax   Zend Con 08

Bertrand SerletSenior VP, Software

Apple, Inc.

“Wow” Factor

WWDC 2006

Page 20: State Of Ajax   Zend Con 08
Page 21: State Of Ajax   Zend Con 08
Page 22: State Of Ajax   Zend Con 08
Page 23: State Of Ajax   Zend Con 08
Page 24: State Of Ajax   Zend Con 08

First Wave of Ajax:Making JavaScript Better

and Web App Development Suck Less

Page 25: State Of Ajax   Zend Con 08

XHR

Page 26: State Of Ajax   Zend Con 08

The Old Taxonomy

dojoYour Soup-to-Nuts Ajax/Javascript

Platform

PrototypeLightweight Ajax/JavaScript helpers

GWTHate JavaScript? No problem, use Java.

jQueryNew, DOM-centric JavaScript helper

Page 27: State Of Ajax   Zend Con 08

Prototype jQuery Dojo Core

Plug-in Communityscripteka.com

Plug-in Communityplugins.jquery.com

Plug-in Communitydojox

Script.aculo.us jQuery UI dijit

The New Taxonomy

Page 28: State Of Ajax   Zend Con 08

<script type="text/javascript">

function getCityByZip(zip) {

var xhr = new XMLHttpRequest();

xhr.onreadystatechange = function() {

processResults(xhr);

}

xhr.open("GET", "/fun.endpoint?zip=" + zip);

xhr.send(null);

}

function processResults(xhr) {

if (xhr.readyState == 4) {

var parent = document.getElementById("cityParent");

parent.innerHTML = xhr.responseText;

}

}

</script>

Page 29: State Of Ajax   Zend Con 08

Easy Remoting

<script type="text/javascript">

function getCityByZip(zip) {

new Ajax.Request("/fun.endpoint?zip=" + zip, {

method: "get",

onSuccess: function(xhr) {

$("city").value = xhr.responseText;

}

});

}

</script>

Page 30: State Of Ajax   Zend Con 08

CSS and Animations

dojo.query("#nav > .focusable").

    attr("tabIndex", 0).

    style("border", "1px solid transparent").

    anim({

        "borderColor": { start: "yellow",

end: "white" }

    });

Page 31: State Of Ajax   Zend Con 08

DOM Goodness

$(document).bind("ready", function() {

  $("div").bind("mousewheel", function(event, delta) {

    if (delta < 0) {

      $(this).append("up");

    } else {

      $(this).append("down");

   }

);

});

Page 32: State Of Ajax   Zend Con 08

Dojo Charting

Dojo Grid

Processing.js

Page 33: State Of Ajax   Zend Con 08

Second Wave of Ajax:GUI Toolkits for the Web, or

The Browser as Universal Run-time

Page 34: State Of Ajax   Zend Con 08
Page 35: State Of Ajax   Zend Con 08
Page 36: State Of Ajax   Zend Con 08

Mobile Me / SproutCore

280 Slides / Objective-J

Page 37: State Of Ajax   Zend Con 08
Page 38: State Of Ajax   Zend Con 08

Jef RaskinNoted Usability Expert

The Humane Interface

“!e quality of any [so"ware] is ultimately determined by the quality of the interaction between one human and one system.”

Page 39: State Of Ajax   Zend Con 08

Jef RaskinNoted Usability Expert

The Humane Interface

“If a system’s one-on-one interaction with its human user is not pleasant and facile, the resulting de#ciency will poison the performance of the entire system, however #ne that system might be in its other aspects.

Page 40: State Of Ajax   Zend Con 08
Page 41: State Of Ajax   Zend Con 08
Page 42: State Of Ajax   Zend Con 08
Page 43: State Of Ajax   Zend Con 08

User Interface

Visual Design

Interaction Design

Page 44: State Of Ajax   Zend Con 08

Jakob NielsenNoted Usability Expert

“!e basic advice regarding response times has been about the same for thirty years:

Page 45: State Of Ajax   Zend Con 08

Jakob NielsenNoted Usability Expert

“0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.

Page 46: State Of Ajax   Zend Con 08

Jakob NielsenNoted Usability Expert “1.0 second is about the limit for

the user's $ow of thought to stay uninterrupted, even though the user will notice the delay.

Page 47: State Of Ajax   Zend Con 08

Jakob NielsenNoted Usability Expert

“Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.”

Page 48: State Of Ajax   Zend Con 08
Page 49: State Of Ajax   Zend Con 08

Operating System

Event Queue

Mouse Moved

Mouse Pressed

Mouse Released

Key Pressed

Key Released

“UI Thread”

User Code Painting, etc.

Potential

Bottleneck

Page 50: State Of Ajax   Zend Con 08

“UI Thread”

User Interface

1

BackgroundThread

2X

Page 51: State Of Ajax   Zend Con 08

Operating System

Event Queue

Mouse Moved

Mouse Pressed

Mouse Released

Key Pressed

Key Released

JavaScript Web Browsing

Potential

Bottleneck

Browser

Page 52: State Of Ajax   Zend Con 08

User Interface

BackgroundThread

2X

Browser

1

Page 53: State Of Ajax   Zend Con 08

Brendan EichInventor of JavaScript

CTO, Mozilla

“Most programmers should run away crying [%om threading]. But they don't...

“Instead, as with most other sharp tools, the temptation is to show how big one is by... tempting race-condition fate... Occasionally the results are infamous, but too o"en, with only virtual #ngers and limbs lost, no one learns.

Brendan’s Blog

Page 54: State Of Ajax   Zend Con 08

Brendan EichInventor of JavaScript

CTO, Mozilla

“!reads violate abstractions six ways to Sunday.

“Mainly by creating race conditions, deadlock hazards, and pessimistic locking overhead.

“And still they don't scale up to handle the megacore tera$op future.”

Brendan’s Blog

Page 55: State Of Ajax   Zend Con 08

Brendan EichInventor of JavaScript

CTO, Mozilla

“!reads suck.”

Brendan’s Blog

Page 56: State Of Ajax   Zend Con 08

User Interface

BackgroundThread

2

Browser

1

Page 57: State Of Ajax   Zend Con 08

User Interface

WorkerPool

Browser

1

WorkerPool

2 3

Message Passing

Page 58: State Of Ajax   Zend Con 08

User Interface

WorkerPool

Browser

1

WorkerPool

2 3

Message Passing

XFirefo

x 3.1

“Web worker threa

ds”

Page 59: State Of Ajax   Zend Con 08

Macintosh HD

“You just got another email from your wife!”

32

Page 60: State Of Ajax   Zend Con 08

Fluid

MozillaPrism

Adobe AIR

Gears

Page 61: State Of Ajax   Zend Con 08

Fluid

37signals’Campfire

GreaseMonkey /GreaseKit

Page 62: State Of Ajax   Zend Con 08
Page 63: State Of Ajax   Zend Con 08

HTML 5 Canvas

Page 64: State Of Ajax   Zend Con 08
Page 65: State Of Ajax   Zend Con 08

JavaScript Interpreter Native Canvas Implementation

Issues renderingcommands

Refreshes screenvia native APIs

Retains renderingcommands

Page 66: State Of Ajax   Zend Con 08

?

Page 67: State Of Ajax   Zend Con 08
Page 68: State Of Ajax   Zend Con 08

Google Chrome’s V8 Safari’s SquirrelFish

?IE?Firefox’s TraceMonkey

Page 69: State Of Ajax   Zend Con 08
Page 70: State Of Ajax   Zend Con 08
Page 71: State Of Ajax   Zend Con 08
Page 72: State Of Ajax   Zend Con 08

wiiuse library

JNI

Java Plug-in

WiiTracker

Browser

JavaScript Dart Game

wiiusej

WiiApplet

Page 73: State Of Ajax   Zend Con 08

The New Java Plug-inBeta Shipping Today with Java 1.6 “Update 10”

1 Java plug-in now out-of-processNo more locking up the browser UI on launchApplets can persist across browser sessionsMore control over the Applet’s JVM

2 Improved Applet deploymentJavaScript-based “Deployment Toolkit”Mature JNLP-based Applet metadata

3 A smaller JDKMicro-kernel gives streamlined download option

Page 74: State Of Ajax   Zend Con 08
Page 75: State Of Ajax   Zend Con 08

Don't forget, RIA's have rich internet back-ends! “RIBs”?

Page 76: State Of Ajax   Zend Con 08

Amazon EC2Elastic Compute Cloud

Google App Engine

Aptana Cloud

Page 77: State Of Ajax   Zend Con 08

Web Services

Your Application

Page 78: State Of Ajax   Zend Con 08

The Future?

Page 79: State Of Ajax   Zend Con 08

The Breakdown of Modern Web Development

Page 80: State Of Ajax   Zend Con 08

Safari CSS Animations

Page 81: State Of Ajax   Zend Con 08

Safari CSS Reflections and Masks

Page 82: State Of Ajax   Zend Con 08

<video><audio><canvas><time><progress><meter><menu><input type="email | date | min | max | required"... >postMessageDrag and drop

HTML 5

Ian (Hixie) HicksonStandards Editor, Google Employee

Page 83: State Of Ajax   Zend Con 08

Updating the Web...

Gears

Page 84: State Of Ajax   Zend Con 08

HTML 5 Gears

• Standards• Long term• All browsers• No plugin

• Implementation• Battle hardened• A place for innovation• Cross browser• Plugin

Past

Present

Future

A bleeding edge version of HTML 5!

Page 85: State Of Ajax   Zend Con 08

+ =

Canvas Sophisticated Grid-basedLayout

Page 86: State Of Ajax   Zend Con 08

Ajax

Easy Programming

Model

Easy Remoting

Extensive Customization

Vectors

Great Widgets

Easy Deployment

Great Mobile Story

Desktop Integration

State-of-the-Art Plug-ins

Great FX

Page 87: State Of Ajax   Zend Con 08

Ajax

Easy Programming

Model

Easy Remoting

Extensive Customization

Vectors

Great Widgets

Easy Deployment

Great Mobile Story

Desktop Integration

State-of-the-Art Plug-ins

Great FX

Page 88: State Of Ajax   Zend Con 08