Nothing Special   »   [go: up one dir, main page]

Introduction To AJAX

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Introduction To

“AJAX”

Submitted by:
DEEPAK VASHISHTH
2206033
What Is AJAX??
• AJAX stands for Asynchronous JavaScript And
XML.
• AJAX is a type of programming made popular in
2005 by Google (with Google Suggest).
• With AJAX you can create better, faster, and more
user-friendly web applications.
• AJAX is based on JavaScript and HTTP requests.

 
AJAX is based on the following
web standards:
• JavaScript
• XML
• HTML
• CSS
AJAX Uses HTTP Requests
• In traditional JavaScript coding, if you want to get
any information from a database or a file on the
server, or send user information to a server, you
will have to make an HTML form and GET or
POST data to the server. The user will have to
click the "Submit" button to send/get the
information, wait for the server to respond, then a
new page will load with the results.
• Because the server returns a new page each
time the user submits input, traditional web
applications can run slowly and tend to be
less user-friendly.
• With AJAX, your JavaScript communicates
directly with the server, through the
JavaScript XMLHttpRequest object
• With an HTTP request, a web page can
make a request to, and get a response from
a web server - without reloading the page.
The user will stay on the same page, and he
or she will not notice that scripts request
pages, or send data to a server in the
background.
AJAX is About Better Internet
Applications

However, Internet applications are not always


as "rich" and user-friendly as traditional
desktop applications.
With AJAX, Internet applications can be
made richer and more user-friendly.
WHY USE AJAX?
• Mainly AJAX is used to build a fast, dynamic
website, and also to save resources.
• Ajax allows performing processing on client
computer (in JavaScript) with data taken from the
server.
• For example, fields of forms, choices of user, may
be processed and the result displayed immediately
into the same page.
HOW AJAX WORKS?
• Ajax uses a programming model with display and
events. These events are user actions.
• To get data on the server, the object
XMLHttpRequest provides two methods: open(to
create a connection) & send ( to send a request to
the server).
• Take note that a new XMLHttpRequest
object has to be created for each new file to
load.
Its Used in Purposes such as:
• Forms
• Rapid Interaction
• Avoiding Refreshing
• Auto Complete
ADVANTAGES:
• Less Bandwidth utilization
• Ample User interface
• More efficient
DRAWBACKS:
• Increases the number of user-generated
requests to web servers and their back-ends
• If JavaScript is not activated, Ajax can't
works.
• Any user whose browser does not support
Ajax or JavaScript, or simply has JavaScript
disabled, will not be able to use its
functionality
• Since data to display are loaded
dynamically, they are not part of the page,
and the keywords inside are not viewed by
search engines.
CONCLUSIONS
• Ajax provides functionality to create a
robust web application. Ajax also allows
websites to reduce their overall bandwidth
usage and server load by reducing the
amount of full page loads.
• AJAX applications are browser-
independent and platform-independent.
THANK YOU

You might also like