Ajax: User Experience
description
Transcript of Ajax: User Experience
by Georgi PetrovCSSU 11/14/2007
What you are going to seeWhat is UX and Ajax?Introduction to AjaxAjax in the real worldUsability issues with AjaxWorkarounds to themDesign PrinciplesBetter experience based on Ajax patterns
What is User Experience?
“User experience, often abbreviated UX, is a term used to describe the overall experience and satisfaction a user has when using a product or system.”
User perceptionUX in following the Ajax architecture.
“They're not love handles, just a Rounded Corners Extender.”
Some UX GoalsRewardingEnjoyableEntertainingHelpfulMotivatingFun
What content should we put on the presentation layer?
What is Ajax ?A - AsynchronousJ - JavaScriptA - AndX – XML
Great marketing toolXMLHttpRequest ObjectA way of bringing software-like usability to the
webRather technique or architecture than technology
A little historyJava AppletsAction with DHTMLThen emerged AJAX, new as acronym, not so
new as conception
Available ever since Internet Explorer 5.5 was released in July 2000, but not fully discovered before people started to talk about AJAX and Web 2.0 in 2005.
Traditional vs. Ajax ModelPostbackCallback
Show me AjaxSimple Ajax implementations on backend of
PHP and PythonComparison with codeless MS AJAX on
ASP.NETLet’s see the demo
Ajax in the real worldSubmission FormsMalleable Content Sliders and Other Controls Draggable Content Suggestions
Live Examples:Gmail, Google Suggest, Google Maps
Google AjaxifiedWhy Google.com is not ajaxified at all?
Performance concerns?Security issues?Poor programmers?
We can find part of the answer at Gmail:
“Basic HTML view lets you access your Gmail messages from almost any computer running almost any web browser, even old ones (not
just IE5.5+, Mozilla, and Safari). Especially great for traveling, since you never know what kind of browser that internet cafe in
Siberia is going to have.”
Ajax Usability Ajax can be usable enough, but its root logic
is notAjax relies on JavaScript which is not very
accessible by origin
IE: http= new ActiveXObject("Microsoft.XMLHTTP");
Mozilla, Opera, Safari: http=new XMLHttpRequest();
Ajax issues concerning usabilityBreaks back button supportURL's don't change as state changesCross Browser Issues can be a painToo much code makes the browser slow“Don’t make me wait for Ajax”
Looking for workarounds…Back button workaround
- IFrame solution ?Problems with URL
- mod_rewrite or IISRewrite(e.g. http://me.com/article/110)- ajaxified headers and dynamic location
Cross-browser issues, showcase on next page
Any other suggestions for workaround?
Cross Browser AJAXvar req;function loadXMLDoc(url) {
req = false; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try {
req = new XMLHttpRequest(); } catch(e) {
req = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { req = false; }
} }
if(req) {req.onreadystatechange = processReqChange;req.open("GET", url, true);req.send("");
}}
Frameworks and ToolkitsMS AJAXTelerik RadAjaxASP.NET AJAX Control ToolkitDojo Toolkit
RecapWhat is UX and Ajax?Introduction to AjaxAjax in the real worldUsability issues with AjaxWorkarounds to themDesign PrinciplesBetter experience based on Ajax patterns
Design PrinciplesMinimize traffic between browser and server so that
the user feels the application is responsive.Be clear on the interaction mode being used - regular
HTML, AJAX or desktop application so that the user can predict what will happen next .. no surprises.
While avoiding confusion, borrow from conventions of HTML and desktop applications so that the user can rapidly learn how to use your application.
Avoid distractions such as pointless animations so that the user can focus on the task at hand.
Stick with AJAX wherever possible - just say no to entire page downloads so that the user’s experience is consistent.
Adopt AJAX for usability, so that the user is engaged, and not immediately driven away by your nod to website splash screens, <blink tags>, popup ads, and other usability disasters of websites .
Ajax Patterns for better UXDisplay PatternsInteraction Patterns Coding PatternsArchitectural Patterns
Display PatternsRich CSS
We need our interface to be colorful and rich, but we should minimize the download time of images. Then we can reveal the real power of CSS and to use its capabilities.
Synchronization StatusSynchronization status is important when we have continuous client-server interaction. Example: Telerik RadUpload
Embedded TextEmbedding text in Ajax response is good for search engine robots and for enabling Cut-and-Paste user functionality.Example: Google Maps address balloon
Interaction Patterns
Drag-and-dropPopup data inputHighlightingLive validationAuto-Completion
Coding PatternsBrowser-Agnostic Components
Create cross-browser components, allowing programmers to reuse them without regard for browser compatibility.
Server-side code generationUse a server-side framework to generate the HTML and associated JavaScript.
Architectural Patterns
Local Event-HandlingLocal Cache Predictive DownloadPeriodic RefreshDistinct URLs
Sourceshttp://ajaxpatterns.orghttp://www.telerik.com/products/ajax/history-
of-ajax.aspxhttp://alexbosworth.backpackit.com/pub/
67688http://ajaxian.com/by/topic/usability/http://en.wikipedia.org/wiki/
Ajax_(programming)
Thank You
Q & A