Ajax Technology CSE Seminar Topic with Documentation

Ajax Technology

AJAX stands for Asynchronous JavaScript and XML. Ajax technology was introduced first by Microsoft back in 1999 and had been known as DHTML/JavaScript web application with remote calls. AJAX is not a new programming language, but a new technique for creating better, faster, and more interactive web applications.

With AJAX, a JavaScript can communicate directly with the server, with the XMLHttpRequest object. With this object, a JavaScript can trade data with a web server, without reloading the page.

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.

Ajax technology consists of five parts.

HTML (Hyper Text Markup Language)
JavaScript
DHTML (Dynamic Hyper Text Markup Language)
DOM (Document Object Model)
XML (Extensible Markup Language)
With the help of cooperation and collaboration of these technologies, they can optimize the conventional enterprise information system by using an asynchronous way. Meanwhile, a quickly responded and smoother user interface was provided. Enterprise information system with Ajax can be operated in a more efficient way, which means even use the current hardware, it can provide more load capacity, be more stable and serve more clients in parallel. In this paper: we present two kinds of information system models, one using conventional B/S architecture and the other use Ajax-enhanced B/S architecture.

TECHNOLOGIES USED IN AJAX

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. To implement AJAX the following technologies are required:

XHTML (Extensible Hyper Text Markup Language) and CSS (Cascading Style Sheet) for presentation
the Document Object Model for dynamic display of and interaction with data
XML (Extensible Markup Language) and XSLT (Extensible Stylish Language Transformation) for the interchange, and manipulation and display, of data, respectively
the XMLHttpRequest (Extensible Markup Language Hyper Text Transfer Protocol) object for asynchronous communication


AJAX IS  DIFFERENT

An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary an Ajax engine between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true.

Instead of loading a web page, at the start of the session, the browser loads an Ajax engine written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the users’ behalf. The Ajax engine allows the users interaction with the application to happen asynchronously independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.

Every user action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine instead. Any response to a user action that doesn’t require a trip back to the server such as simple data validation, editing data in memory, and even some navigation the engine handles on its own. If the engine needs something from the server in order to respond if it’s submitting data for processing, loading additional interface code, or retrieving new data the engine makes those requests asynchronously, usually using XML, without stalling a user’s interaction with the application.

USERS OF AJAX

Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps are Ajax applications.

BROWSERS SUPPORTING AJAX


Google Chrome
Apple Safari
Microsoft Internet Explorer 5.0 and above
Mozilla/Mozilla Firefox 1.0 and above
Netscape 7.1 and above
Konqueror
Opera 7.6 and above


USING AJAX


Most web page with the received results without refreshing the whole page. By creators opinion, this should have improved customers experience, making HTTP pages look and feel very similar to Windows applications.

Because the core implementation of this technology was based on internet browser functionality, the usability was very limited at that time. But several years later, the technology has been reborn with new browsers support and massive implementation by such giants as Google, Amazon.com, eBay, etc. Today, it’s known as AJAX and considered as a natural part of any dynamic web page with the advanced user experience.

Basically, a regular AJAX-like implementation includes two main components: a client HTML page with JavaScript code making an AJAX call and receiving a response, and a remote page that can accept a request and respond with the required information. The JavaScript code on the client page is responsible for instantiating an object,XmlHttp then providing this object with a callback method which will be responsible for processing the received information, and finally, sending a request to the remote page via the object XmlHttp. All this is done by the JavaScript code.
Our approach is intended for use in ASP.NET applications, and considers the following possible scenarios:

AJAX calls may be performed on different ASP.NET pages of the web application to different remote pages;
A remote page URL may contain dynamically calculated parameters, and it may be more convenient to build a URL string in the code-behind of the ASP.NET page;
A remote page may respond with a complex data requiring parsing before updating an HTML page, that once again may be done in the code-behind of the ASP.NET page;
A remote page may be either an external third party page or the web applications own page or service.
All these considerations are illustrated by the diagram below:

Advantages of AJAX

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.
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.
The use of AJAX can reduce connections to the server since scripts and style sheets only have to be requested once
The state can be maintained throughout a Web site. JavaScript variables will persist because the main container page need not be reloaded.


Drawbacks of AjAX

AJAX interfaces are substantially harder to develop properly than static pages.
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, but may instead return them to the last full page visited before it.
Dynamic web page updates also make it difficult for a user to bookmark a particular state of the application. Solutions to this problem exist, many of which use the URL fragment identifier to keep track of, and allow users to return to, the application in a given state.
Any user whose browser does not support JavaScript or XMLHttpRequest, or simply has this functionality disabled, will not be able to properly use pages which depend on AJAX. Similarly, devices such as mobile phones, PDAs, and screen readers may not have support for the required technologies. screen readers that are able to use AJAX may still not be able to properly read the dynamically generated content.
AJAX opens up another attack vector for malicious code that web developers might not fully test for.


Conclusion

The AJAX technique makes Internet applications smaller, faster and more user-friendly. AJAX is a technology, which breaks the paradigm of page reload and saves a lot of bandwidth. It can send and retrieve the data without reloading the web page, meaning, that gone are the days where for each data retrieval, we needed to reload the complete web page.

No comments:

Post a Comment