L8: Dynamic Web Pages: Effective Use of AJAX Flashcards
What is AJAX?
Asynchronous JavaScript & XML.
Remote scripting. An approach for making server requests without reloading the whole page.
What does AJAX rely on?
- Server request browser function (XMLHttpRequest) –> Request to the server for more data.
- Uses document object model (DOM) scripting to make changes to the current page.
AJAX =
DHTML + XMLHTTPrequest
DHTML is a tecnique using:
- XHTML
- CSS
- JavaScript
- DOM
Ajax relies on DHTML and what other web technology?
XMLHttpRequest
without implementing AJAX:
- Request is for a url
* Anything that is returned must be a complete page with appropriate headers.
with the implementation of AJAX:
- Client-side scripts use XMLHttpRequest to make a request for data.
- The data does not have to be XML
- Request can complete at anytime but user is not left waiting for a new page updates achieved through the DOM.
The main advantages of Ajax:
- It’s faster to load a certain section of a webpage than returning a whole page.
- Data-oriented requests mean greater code reuse - especially on the server side.
- Overall approach can be more like a desktop application.
The disadvantages of Ajax:
- The asynchronous data requests rely on technology that can vary from browser to browser.
- Different code needed on different browsers
- Requests may not complete in a timely fashion (or not at all)
- Pages laden with code take longer to load
- Network overheads may make short transfers slow in proportion
AJAX: Installation
Plug-in or installation required
AJAX: Speedy Start
How quickly users can start to interact
AJAX: Granularity
The smallest unit of data updates
AJAX: Portability
Portability across platforms
AJAX: Maintenance
Difficulty of making and distributing changes
AJAX: Sophistication
Richness of the user experience
UML
(Unified Modeling Language) is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems.
Gran·u·lar·i·ty
the scale or level of detail present in a set of data or other phenomenon.
AJAX can prevent ____________________.
unnecessary page reloads.
How does Ajax reduce the effects of change blindness?
Eliminates page reloads and reduces load times.
Ajax can prevent unnecessary page reloads but error messages and other feedback still need to be obvious. What are some ways to achieve that?
- Use color and animation appropriately
* Consider the position of feedback
Updating pages without reloading is only effective if…
- users are looking in the right place or
* the change attracts attention by being large, colorful or animated.
Inattention blindness- even large changes may not be seen if..
- The task is demanding
* Users are stressed or fatigued
Change blindness- changes will not be noticed, especially if…
- a page reload is involved
* Users are distracted
Attentional gambling - users will not attend to content or navigation if..
- If it isn’t where they expected it to be
* If they are distracted