8
Understanding Ajax Shyamala Prayaga May 2009

Ajax Backbone

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Ajax Backbone

Understanding Ajax

Shyamala PrayagaMay 2009

Page 2: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 2

Agenda

• Understanding Ajax

• Backbone of Ajax

• How Ajax works

Page 3: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 3

What is Ajax?

• Ajax stands for Asynchronous JavaScript and XML

• Not a new technology

• New technique for creating better, faster and interactive applications

Page 4: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 4

Ajax Backbone

• JavaScript

• XML

• HTML

• CSS

Page 5: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 5

How Ajax Works?

• JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object.

• All new browsers use the built-in JavaScript XMLHttpRequest object to create an XMLHttpRequest object

• IE5 and IE6 uses an ActiveXObject

Page 6: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 6

XMLHttpRequest object Properties

• onreadystatechange property - stores the function that will process the response from a server

• readyState property - readyState property holds the status of the server's response.

• responseText property - The data sent back from a server can be retrieved with the responseText property.

Page 7: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 7

Sending response to the server

• open() method– takes three arguments – The first argument defines which method to use when sending

the request (GET or POST). – The second argument specifies the URL of the server-side

script. – The third argument specifies that the request should be handled

asynchronously.

• Send() method– sends the request off to the server.

Page 8: Ajax Backbone

Yodlee®, Inc. Copyright © 2009 - 04/10/2023 - CONFIDENTIAL 8

Questions?