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.