Asynchronous Javascript + XML Term by Adaptive Path “Dynamic

Asynchronous Javascript + XML Term by Adaptive Path “Dynamic

Ajax ● Asynchronous Javascript + XML ● Term by Adaptive Path ● “Dynamic HTML and remote scripting” ● Not technology itself, refers to combination of technologies ● Client side technology Traditional web applications ● The application consists of several pages ● When the user clicks on a link, the browser fetches a new page from the server (http://www.adaptivepath.com/publications/essays/archives/000385.php) Cons ● Limited interaction ● Refresh on every load ● Latency ● A lot of cumulative network traffic Ajax approach ● Web application in single page ● Updates on the page http://www.adaptivepath.com/publications/essays/archives/000385.php Ajax approach continued ● Google uses Ajax extensively: Google Maps, Google suggest ● Alternatives to Ajax: Flash, Java Ajax Components ● HTML + CSS for the layout ● DOM (Document Object Model) for modifying the page on the fly ● XML commonly used for data ● Javascript for scripting ● IFrame and XMLHttpRequest for asynchronous requests ● CSS+DOM+Javascript = DHTML CSS ● Cascading Style Sheets ● Separates presentation from XHTML/HTML ● Rules consist of selector and style declaration ● Example: h1 { color: red } makes all h1 tags red Javascript ● Embedded general use scripting language implemented in majority of web browsers ● Syntax resembles C and Java DOM ● Document Object Model ● Description of HTML document is object- oriented fashion ● Tags are represented as nodes in a tree ● Scripting interface for accessing (Javascript) ● Global Javascript variable “document” ● Element identifiers ● Firefox DOM Inspect or IFrame ● HTML tag. “Inline frame”. Embeds a frame ● Can be created with DOM: document.createElement() on the fly ● Can be hidden with CSS -> some data is loaded to the IFrame but not shown = asynchronous HTTP get. ● onLoad attribute ● Hack, difficult to use, but supported by majority of browsers XMLHttpRequest ● Originally developed by Microsoft as a part of ActiveX in IE 5.0, nonstandard ● Mozilla 1.0 implemented native Javascript version ● Makes asynchronous HTTP Request ● Can be used to get any document with HTTP, not limited to XML despite name ● Browser support inferior to IFrame Ajax Drawbacks ● Bookmarking difficult ● “Back” button behavior ● Inconsistencies between browsers ● Scripts can break easily .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us