What Is Ajax technology?

Source: Internet
Author: User
Tags xslt microsoft outlook

1. What is Ajax technology?
The full name of Ajax is Asynchronous JavaScript + XML.

2. Ajax definition:
Ajax is not a technology. It is actually several technologies, each of which has its own unique characteristics. Together, Ajax becomes a powerful new technology.

3. Ajax includes:
XHTML and CSS
Use Document Object Model for Dynamic Display and Interaction
Use XML and XSLT for Data Interaction and operations
Use XMLHttpRequest for asynchronous data receiving
Bind them together using JavaScript

The essence of the latest buzzword in the Web development field is "old looks new ".

Ajax (Asynchronous JavaScript and XML) is a combination of Java, XML, JavaScript and other programming technologies, allowing developers to build Java-based Web applications, and broke the Convention of using page overloading.

Ajax is a Web application development method that uses client scripts to exchange data with Web servers. In this way, the Web page can be dynamically updated without interrupting the interaction process and cutting it again. With Ajax, users can create direct, highly available, richer, and more dynamic Web user interfaces close to local desktop applications.

Asynchronous JavaScript and XML (AJAX) are not a new technology, but a method that uses several existing technologies-including Cascading Style Sheets (CSS), JavaScript, XHTML, XML, and extensible style language conversion (XSLT), develop Web applications that look and operate similar to desktop software. All components that implement Ajax have existed for many years. Jesse James Garnett, Director and founding partner of Adaptive Path's user experience Strategy Department, wrote this term in an article published on the Adaptive Path website in February this year.

Asynchronous refers to how AJAX applications interact with host servers. If the old mode is used, the Web browser updates the current window whenever a user performs an operation and requests new data from the server.

If AJAX is used in asynchronous mode, the browser does not have to wait for user request operations or update the entire window to display the newly acquired data. As long as the data in XML format is transmitted back and forth, the JavaScript code running in the browser can contact the server. JavaScript code can also add a style sheet to the Retrieved Data and display it in a part of an existing webpage.

Among the many consumer-oriented applications, Google's Gmail and Google Maps are the most common examples. In Gmail, AJAX is responsible for how to enable thread sessions to display the text content of different emails. In Maps, AJAX allows users to drag and scroll Maps in a seemingly seamless manner.

There are also Yahoo's Flickr Image Sharing application and the A9 search engine of the Amazon website. In addition, Yahoo's new Web mail service may soon attract the great attention of AJAX supporters, which is based on the technology obtained after Yahoo acquired Oddpost.

These UIS fully use backend channels and are also called "Web 2.0" by some developers, leading to a surge in interest in Ajax applications.

However, AJAX application software vendors are increasingly focusing on enterprises. For example, Scalix's Web Access email application is actually more like Outlook than Microsoft Outlook's Web email interface.

However, the application fields of AJAX applications have certain limitations. Because they use some of the latest Web technologies, they can only run in some Web browsers-But AJAX is applicable to more and more browsers.

Ajax

Ajax, Asynchronous JavaScript, and XML are Web application development methods that use client scripts to exchange data with Web servers. In this way, the Web page can be dynamically updated without interrupting the interaction process and cutting it again. With Ajax, you can create direct, highly available, richer, and more dynamic Web user interfaces that are close to local desktop applications.

Ajax Processing

An Ajax interaction starts with a JavaScript Object called XMLHttpRequest. As the name implies, it allows a client script to execute an HTTP request and parse a server response in XML format. The first step in Ajax processing is to create an XMLHttpRequest instance. Use the HTTP method (GET or POST) to process the request and set the target URL to the XMLHttpRequest object.

Now, remember how Ajax is in the asynchronous processing state first? When you send an HTTP request, you do not want the browser to suspend and wait for the response from the server. Instead, you want to continue responding to user interface interactions through the page, and post-processing them after the server response actually arrives. To complete this, you can register a callback function with XMLHttpRequest and asynchronously dispatch the XMLHttpRequest request. The Control Right is immediately returned to the browser. When the server responds, the callback function will be called.

On the Java Web server, the incoming requests are the same as any other HttpServletRequest requests. After parsing the request parameters, the servlet executes the necessary application logic, serializes the response to the XML, and writes it back to HttpServletResponse.

An Ajax interaction starts with a JavaScript Object called XMLHttpRequest. As the name implies, it allows a client script to execute an HTTP request and parse a server response in XML format. The first step in Ajax processing is to create an XMLHttpRequest instance. Use the HTTP method (GET or POST) to process the request and set the target URL to the XMLHttpRequest object.

Now, remember how Ajax is in the asynchronous processing state first? When you send an HTTP request, you do not want the browser to suspend and wait for the response from the server. Instead, you want to continue responding to user interface interactions through the page, and post-processing them after the server response actually arrives. To complete this, you can register a callback function with XMLHttpRequest and asynchronously dispatch the XMLHttpRequest request. The Control Right is immediately returned to the browser. When the server responds, the callback function will be called.

On the Java Web server, the incoming requests are the same as any other HttpServletRequest requests. After parsing the request parameters, the servlet executes the necessary application logic, serializes the response to the XML, and writes it back to HttpServletResponse.

An Ajax interaction starts with a JavaScript Object called XMLHttpRequest. As the name implies, it allows a client script to execute an HTTP request and parse a server response in XML format. The first step in Ajax processing is to create an XMLHttpRequest instance. Use the HTTP method (GET or POST) to process the request and set the target URL to the XMLHttpRequest object.

Now, remember how Ajax is in the asynchronous processing state first? When you send an HTTP request, you do not want the browser to suspend and wait for the response from the server. Instead, you want to continue responding to user interface interactions through the page, and post-processing them after the server response actually arrives. To complete this, you can register a callback function with XMLHttpRequest and asynchronously dispatch the XMLHttpRequest request. The Control Right is immediately returned to the browser. When the server responds, the callback function will be called.
On the Java Web server, the incoming requests are the same as any other HttpServletRequest requests. After parsing the request parameters, the servlet executes the necessary application logic, serializes the response to the XML, and writes it back to HttpServletResponse.
The essence of Ajax is actually just a few words to clarify what is asynchronous and synced, just to learn what it means and deliberately don't want to be understood.

Http is actually a Q & A protocol. When you submit a request, webserver gives you a webpage. However, this webpage is actually divided into two parts: content and format. In the past, webpage design was divided into two categories, depending on your habits. However, in AJAX mode, the content must be retrieved in xmlhttp format using javascript. In this way, content extraction is separated from format extraction, and network bandwidth is reduced.

This is just the beginning. javascript becomes more complicated when the UI is involved below. You can call it to regularly send XMLHTTP requests to the server, convert the returned results to javascript objects, and design a javascript control interface to allow users to call this object in a menu, update the user interface.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.