0% found this document useful (0 votes)
155 views15 pages

A Seminar Report Submitted For The Partial Fulfillment of The Requirements For The Degree of

The document discusses AJAX (Asynchronous JavaScript and XML), including: 1) AJAX allows web applications to retrieve data from servers asynchronously without interfering with the display of existing pages, improving interactivity. 2) Key AJAX technologies include JavaScript, XML, XMLHttpRequest object, and DOM manipulation. 3) AJAX works by using the XMLHttpRequest object to asynchronously send and receive data from a web server in the background, without reloading the entire page. 4) Advantages of AJAX include reduced bandwidth usage, more interactive user interfaces, and faster perceived page loads.

Uploaded by

Ashok Pradhan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views15 pages

A Seminar Report Submitted For The Partial Fulfillment of The Requirements For The Degree of

The document discusses AJAX (Asynchronous JavaScript and XML), including: 1) AJAX allows web applications to retrieve data from servers asynchronously without interfering with the display of existing pages, improving interactivity. 2) Key AJAX technologies include JavaScript, XML, XMLHttpRequest object, and DOM manipulation. 3) AJAX works by using the XMLHttpRequest object to asynchronously send and receive data from a web server in the background, without reloading the entire page. 4) Advantages of AJAX include reduced bandwidth usage, more interactive user interfaces, and faster perceived page loads.

Uploaded by

Ashok Pradhan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

AJAX

A Seminar Report Submitted


For the partial fulfillment of the requirements for the degree of

Master in Computer Application


Under Biju Patnaik University of Technology, Orissa

Submitted by

Ashok Kumar Pradhan


Regd. No.-0905227085
2nd Semester

C.V. RAMAN COMPUTER ACADEMY


BHUBANESWAR – 752 054
Contents

Introduction
What is Ajax
History
Why use Ajax
Ajax as a combination of technology
How Ajax works
Advantages
Disadvantages
Future
Conclusion
References
Introduction

Internet is very important technology in this era. Most of students, teachers and computer
users are using this technology. However, there are some problems with this technology.
Because of interacting with some servers across the world, this procedure makes the
interacting not that fast. Web-designers and Internet developers try to solve this problem by
many ways. One of these ways is design new web-programming languages such as JavaScript
or XML. Unfortunately, these new ways solve a part of these problems but the other parts
still face problems. Some scientists say that if there is an ideal solvent to this problem, the
people life will depend almost completely on the computers. Here we are going to tell you
about a new technology called Ajax that has been solving big part of problems with browsing
the Internet. Ajax is actually a family of technologies that have been available for years. The
means to make requests to the server using only JavaScript were built into Internet Explorer
5.5, but the possibilities of the technology were overlooked. It was only in 2005 that the
techniques were rediscovered and used, notably to excellent effect in Google’s Gmail web
application.
What is Ajax

AJAX (shorthand for Asynchronous JavaScript and XML)

Asynchronous:

This means that when you send a request, you wait for the response to come back, but are
free to do other things while you wait. The response probably won’t come back immediately,
so you set up a function that will wait for the response to be sent back by the server, and react
to it once that happens.

JavaScript:

JavaScript is used to make a request to the server. Once the response is returned by the
server, you will generally use some more JavaScript to modify the current page’s document
object model in some way to show the user that the submission went through successfully.

XML:

The data that you receive back from the server will often be packaged up as a snippet of
XML, so that it can be easily processed with JavaScript. This data can be anything you want,
and as long as you want.

Ajax is a group of interrelated web development techniques used on the client-side to create
interactive web applications or rich Internet applications.
With Ajax, web applications can retrieve data from the server asynchronously in the
background without interfering with the display and behavior of the existing page. The use of
Ajax has led to an increase in interactive or dynamic interfaces on web pages and better
quality of Web services due to the asynchronous mode.
Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of
JavaScript and XML is not actually required, nor do the requests need to be asynchronous.
History

Techniques for the asynchronous loading of content date back to the mid 1990s. Java applets
were introduced in the first version of the Java language in 1995. These allow compiled
client-side code to load data asynchronously from the web server after a web page is loaded.
In 1996, Internet Explorer introduced the IFrame element to HTML, which also enables this
to be achieved. In 1999, Microsoft created the XMLHTTP ActiveX control in Internet
Explorer 5, which is now supported by Mozilla, Safari and other browsers as the native
XMLHttpRequest object. However, this feature only became widely known after being used
by Gmail (2004) and Google Maps (2005).

Ajax is only a name given to a set of tools that previously existed. The main part is
XMLHttpRequest, a server-side object usable in JavaScript that was implemented into
Internet Explorer since the 4.0 version. In Internet Explorer it is an ActiveX object that was
first named XMLHTTP sometimes, before to be generalized on all browsers under the name
XMLHttpRequest, when the Ajax technology becomes commonly used. The use of
XMLHttpRequest in 2005 by Google, in Gmail and Google Maps has contributed to the
success of this format. But this is the when the name Ajax was itself coined that the
technology started to be so popular.
Why use Ajax

Mainly AJAX is used to build a fast, dynamic website, and also to save resources. For
improving sharing of resources, it is better to use the power of all the client computers rather
than just a unique server and network. Ajax allows performing processing on client computer
(in JavaScript) with data taken from the server. The processing of web page formerly was
only server-side, using web services or PHP scripts, before the whole page was sent within
the network. But Ajax can selectively modify a part of a page displayed by the browser, and
update it without the need to reload the whole document with all images, menus, etc. For
example, fields of forms, choices of user, may be processed and the result displayed
immediately into the same page.
Ajax as a combination of technology

The term Ajax has come to represent a broad group of web technologies that can be used to
implement a web application that communicates with a server in the background, without
interfering with the current state of the page:

.
 HTML and CSS for presenting.
 JavaScript for local processing, and DOM (Document Object Model) to access
data inside the page or to access elements of XML file read on the serverXML
and XSLT to process the data if returned in XML form
 The XMLHttpRequest object is used to read or send data on the server
asynchronously.

Optionally:

 DOM Parser may be used.

 PHP or another scripting language may be used on the server.

 XML and XSLT to process the data if returned in XML form.

How Ajax works


Ajax uses a programming model with display and events. These events are user actions; they
call functions associated to elements of the web page. Interactivity is achieved with forms
and buttons. DOM allows to link elements of the page with actions and also to extract data
from XML files provided by the server. To get data on the server, XMLHttpRequest provides
two methods:

- open: create a connection.


- send: send a request to the server.
Data furnished by the server will be found in the attributes of the XMLHttpRequest object:
- responseXml for an XML file or
- responseText for a plain text.

Take note that a new XMLHttpRequest object has to be created for each new file to load. We
have to wait for the data to be available to process it, and in this purpose, the state of
availability of data is given by the readyState attribute of XMLHttpRequest.

States of ready State follow (only the last one is really useful):

Before discussing how Ajax works, you should know how the old technologies work. Why
should you know how the old technologies work? The answer is simply to observe the
difference between the old technologies and Ajax. The action is sent to the server by
requesting an HTTP trigger and you, the internet user, wait to the server to respond. It is also
not that simple. The server will do many jobs in each request. After doing some processing
stuff the server will respond to the client.

This way is very technical but do you ask yourself this question: What you will do when the
server does its jobs? The answer is nothing but waiting for the jobs to be done by the server.
This is clearly a problem. It is wasting time and money. (2:2) On the other hand, Ajax will
eliminate the number of interactions with the server by asking the server to do some specific
job(s). How Ajax does that? This is done by putting Ajax Engine in the middle between the
client and the server. Ajax engine will make the application is less responsive. (2:2)
Furthermore, after knowing that there is something called Ajax engine but you where it is or
how to get it. Do not worry, the user does not have to download this engine or buy it. It is
simply when the user tries to load the webpage, the Ajax engine will be loaded instead. This
engine is written in JavaScript. Rendering the visual interface and interaction with the server
is not a user’s responsibilities it is an Ajax engine’s responsibilities. This whole processes
take place asynchronously. It is independent of communication with the server. So, if you
want to re-load or update the webpage, then you do not have to start from an empty webpage.
So, the internet’s user will interact with Ajax engine instead of interacting with the server.
How Ajax engine working is not our issue. So as I said earlier, Ajax engine will take care of
interacting with server asynchronously.

The XMLHttpRequest object

Allows interacting with the servers, thanks to its methods and attributes.

Attributes:

Methods:
Old technologies Comparison with AJAX.
Advantages

 Bandwidth utilization:-

In many cases, related pages on a website consist of much content that is common
between them. Using traditional methods, that content would have to be reloaded on
every request. However, using Ajax, a web application can request only the content
that needs to be updated, thus drastically reducing bandwidth usage and load time.

 User Interface:-

The use of asynchronous requests allows the client's Web browser UI to be more
interactive and to respond quickly to inputs, and sections of pages can also be
reloaded individually. Users may perceive the application to be faster or more
responsive, even if the application has not changed on the server side.

 More Efficient:-

The use of Ajax can reduce connections to the server, since scripts and style sheets
only have to be requested once.

State can be maintained throughout a Web site. JavaScript variables will persist
because the main container page need not be reloaded.

 Cross browser compatibility:-

Ajax applications work well on all new web browsers.

 Ajax is server agnostic:-

Ajax applications are server independent and they will work on any type of HTTP
server like Apache, IIS, JBoss, and IBM Web Sphere etc.
Disadvantages

 The ease of use of Ajax-powered interfaces often dramatically increases the number
of user-generated requests to web servers and their back-ends (databases, or other).
This can lead to slower response times and additional hardware needs to support
Ajax-powered interfaces.

 Pages dynamically created using successive Ajax requests do not automatically


register themselves with the browser's history engine, so clicking the browser's "back"
button may not return the user to an earlier state of the Ajax-enabled page, but may
instead return them to the last full page visited before it.

 Any user whose browser does not support Ajax or JavaScript, or simply has
JavaScript disabled, will not be able to use its functionality. Similarly, devices such as
mobile phones, PDAs, and screen readers may not have support for JavaScript or the
XMLHttpRequest object.

 The asynchronous mode may change the page with delays (when the processing on
the server takes some times), this may be disturbing.

 The back button may be deactivated. This may be overcome.


Future

Big applications of Ajax showed that it is not just a technical issues but it is a real world
application. As the seminar demonstrates earlier, Ajax has the ability to grow. Ajax
applications face some non-technical difficulties. For instance, the programmers and the
developers are not qualified yet to implement this approach. However, big companies like
Microsoft, Sun Microsystems Inc
This step will make Ajax is very popular. Microsoft wants to develop smart client strategy by
implementing Ajax . Microsoft Atlas is an Ajax based programming framework.
Conclusion:
Internet-applications have many benefits over desktop applications; they can reach a larger
audience, they are easier to install and support, and easier to develop. However, Internet-
applications are not always as "rich" and user-friendly as traditional desktop applications.
AJAX applications are browser- independent and platform-independent. With AJAX, Internet
applications can be made richer and more user-friendly. AJAX is not a new programming
language, but a new technique for creating better, faster, and more interactive web
applications. AJAX uses asynchronous data transfer (HTTP requests) between the browser
and the web server, allowing web pages to request small bits of information from the server
instead of whole pages. New applications use Ajax will be very popular.
References

http://ajaxian.com/by/topic/ajax
http://www.w3schools.com/Ajax/Default.Asp
http://www.devolper.com /ajax
http://java.sun.com/features/index.html
http://www.youtube.com/watch?v=tJXLRLDWjn4
http://en.wikipedia.org/wiki/Ajax_(programming)
http://en.wikipedia.org/wiki/Ajax_framework

You might also like