Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;};...

36
Bulletproof Ajax

Transcript of Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;};...

Page 1: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

Bulletproof

Ajax

Page 2: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

progressiveenhancement

Bulletproof

Page 3: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

structurepresentationbehaviour

contentHTML

CSSJavaScript

Page 4: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

<p>This is the introduction</p><p style="font-weight:bold">This is the introduction</p><p class="intro">This is the introduction</p>.intro { font-weight:bold; }

Page 5: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

<a href="help.html">Need help?</a><a href="help.html"onclick="window.open(this.href); return false;">Need help?</a><a href="help.html"class="help">Need help?</a>

Page 6: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

link.onclick = function(){ window.open(this.href); return false;};

window.onload = function() {

};

// get links with class help// loop through links

Page 7: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

<a href="javascript:...">

<a href="#" onclick= "...">

beware

Page 8: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

Ajaxcommunicating with the server without refreshing

the whole page.

Page 9: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

framesiframeFlashXMLHttpRequest

communicating with the server without refreshing

the whole page.

Page 10: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

XMLHttpRequest

MicrosoftMozillaSafariOpera

IE5

W3C

Page 11: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

browser serverXHRopensend

statusresponseText

XMLHttpRequest

Page 12: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

speed

Page 13: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

thin client

Page 14: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

browser serverdata

processingdisplaying

thin client

Page 15: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

fat client

Page 16: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

browser serverXHRdata

processingdisplaying

fat client

Page 17: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

dumbwaiter

Page 18: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

XMLHttpRequestusing

progressiveenhancement

Page 19: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

Hijax

progressiveenhancement

Page 20: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

browser serverdata

processingdisplaying

Page 21: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

browser serverXHRdata

processingdisplaying

deceptivelyfat client

Page 22: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links
Page 23: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

navigationsearch

main contentlog on form

shopping cartfooter

{browser server

Page 24: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

XHR

navigationsearch

main contentlog on form

shopping cartfooter

browser

Page 25: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

implement Ajax at the end

plan for Ajax from the start

paradox?

Page 26: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

pattern recognition

log onadd to cart

rate this

add a comment

search results?

MozillaMozillapagination?

Page 27: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

documents

applications

Page 28: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

design challenges

Page 29: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

WTF?what is happening?what just happened?

Page 30: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

beyond the browserthe back buttonbookmarking

Page 31: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

user testing

Page 32: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

AccessibilityJustAin’t

eXciting

Page 33: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

“Unless a way can be found to notify screen readers of updated content, Ajax techniques cannot be considered accessible.”

Page 34: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

“This Ajax application is usable by screen-reader users some of the time. They aren’t totally shut out, but it isn’t totally easy for them, either.”

Page 35: Bulletproof Ajax - Jeremy Keithlink.onclick = function(){window.open(this.href); return false;}; window.onload = function() {}; // get links with class help // loop through links

“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”