You are on page 1of 15

Welcome

Introduc

Thanks

Speaker
Topics
Index
e

D.M Jahid Hasan


ID: 170310004
CSE, ZH Sikder University of Science & Technology
Welcome
Topics
Index
Properties
Index
Topics

E
Discussion On AJAX
WELCOM
AJAX AJAX AJAX
1 2 3
W.System
Structur

Introducin

Speaker
Topics
Index
Introducing Working Structure
e
g

System
AJAX AJAX AJAX
4 5 6
W.System
Structur

Introducin

Speaker
Topics
Index
Properties Important Question Part
e
g

Discussion
Introducing AJAX

AJAX= ASynchronous JavaScript and XML.


W.System
Structur

Introducin

Speaker
Topics
Its not a New Programming Language but new way to use existing.

Index
e

g
Ajax is a art of Exchanging Data with Server.

Ajax is based on Internet Standards and Uses of Combination

Ajax Applications are Browser and Platform Independent


Structur
e

W.System
Introducin
g
Index
Topics
Speaker
Page 01

Page 02

Page 03

Properties of
Page 04

AJAX Page 05

Page 06

Page 07
The keystone of AJAX is the
XMLHttpRequest object.
Creating AJAX
The XMLHttpRequest Object
All modern browsers support the
XMLHttpRequest object (IE5 and IE6 use an Send Req to the
ActiveXObject). Server
The XMLHttpRequest object is used to
exchange data with a server behind the
scenes. This means that it is possible to
update parts of a web page, without Get or Post
reloading the whole page.

Important properties

Page 05

Page 06

Page 07
Method Description

Send Request To the Server


open Specifies the type of request, the URL,
The keystone of AJAX is the (method,url, and if the request should be handled
XMLHttpRequest object. async) asynchronously or not.
Creating AJAX method: the type of request: GET or
The XMLHttpRequest Object POST
All modern browsers support the url: the location of the file on the server
async: true (asynchronous) or false
XMLHttpRequest object (IE5 and IE6 use an (synchronous)
ActiveXObject).
The XMLHttpRequest object is used to
exchange data with a server behind the
scenes. This means that it is possible to
update parts of a web page, without Get Or Post
reloading the whole page.

Important properties
send(string) Sends the request off to the server.
string: Only used for POST requests

Page 05

To send a request to a server, we use the open() and


Page 06
send() methods of the XMLHttpRequest object:
Example

xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send(); Page 07
Method Description
open Specifies the type of request, the
(method,u URL, and if the request should be GET is simpler and faster than
rl,async) handled asynchronously or not.
Page 01
method: the type of request: GET
POST, and can be used in most
or POST cases.
url: the location of the file on the
server However, always use POST
Send req to Server
async: true (asynchronous) or false requests when:
(synchronous)
A cached file is not an
option (update a file or Get or Post
database on the server)
Sending a large amount
of data to the server Important properties
send(strin Sends the request off to the server.
g) string: Only used for POST (POST has no size
requests limitations) Page 05
Sending user input
(which can contain
To send a request to a server, we use the open() and unknown characters), Page 06
send() methods of the XMLHttpRequest object:
Example POST is more robust and
xmlhttp.open("GET","ajax_info.txt",true); secure than GET
xmlhttp.send(); Page 07
Three important properties of the XMLHttpRequest

Property Description

Page 01 GET is simpler and faster than onreadystat Stores a function (or the name

Important Properties
echange of a function) to be called
POST, and can be used in most automatically each time the
cases. readyState property changes
Get or Post
However, always use POST
requests when:
A cached file is not an
readyState Holds the status of the
option (update a file or XMLHttpRequest. Changes
from 0 to 4:
database on the server) 0: request not initialized
Sending a large amount 1: server connection
established
Page 04
of data to the server 2: request received
3: processing request
(POST has no size 4: request finished and
response is ready Page 05
limitations)
Sending user input
(which can contain Page 06
unknown characters),
POST is more robust and
secure than GET Status 200: "OK"
Page 07
404: Page not found
Three important properties of the XMLHttpRequest

Property Description

Propertise onreadystat Stores a function (or the name

Important Properties
echange of a function) to be called
automatically each time the
readyState property changes

readyState Holds the status of the


XMLHttpRequest. Changes
from 0 to 4:
0: request not initialized
1: server connection Page 04
established
2: request received
3: processing request
4: request finished and
response is ready Page 05

Page 06

Status 200: "OK"


Page 07
404: Page not found
Conclusion

Disadvantage Ajax provides functionality to


create a robust web
application. 03
 If an Ajax web application is

Properties
coded properly it will run

W.System
Discussio

Structur
Introducin
integration of

Speaker
faster than and as secure as a
Advantage

Topics
browsers non-Ajax program.

Index
 Ajax also allows websites to
Page can be refreshed • hard for the user to reduce their overall

02
dynamically bookmark the state bandwidth usage and server

n
of the web page load by reducing the amount

e
g
• Response of the interface to of full page loads.
user is faster

• Load much faster because the

01
payload is much smaller

• Reduces the demand for


bandwidth

• Allows the web applications to


be much more efficient

• Operate more like an


application rather than a
standalone program
Any Question ?

Questions
Properties
Structur
W.System
e
Introducin
g
Index
Topics
Speaker
Thanks for Patience.

Thanks
Properties
Structur
W.System
e
Introducin
g
Index
Topics
Speaker

You might also like