ajax

Web data interaction mode
open 6 entries with the same name
Collection
zero Useful+1
zero
Ajax A synchronous J avascript A nd X ML (asynchronous JavaScript and XML), a new term proposed by Jesse James Garrett in 2005, is used to describe the use of Existing technology 'New' methods for collections, including: HTML or XHTML , CSS, JavaScript , DOM , XML, XSLT, And most importantly XMLHttpRequest [3] Web applications using Ajax technology can quickly Incremental update Presented in user interface Instead of reloading (refreshing) the entire page, this allows the program to respond to user actions more quickly. [3]
Chinese name
Asynchronous JavaScript and XML
Foreign name
Asynchronous JavaScript And XML
Application
WEB data interaction

source

Announce
edit
Building applications using ajax
The term Ajax comes from describing applications from Web to data.
Ajax is not new programing language , but a way to create better, faster and Interactivity Stronger web application technology.
Use JavaScript to make requests to the server and process responses without blocking user core objects XMLHttpRequest With this object, your JavaScript can exchange data with the Web server without reloading the page, that is, it can produce a local refresh effect without refreshing the page.
Ajax uses asynchrony between browsers and Web servers data transmission (HTTP request), so that the web page can request a small amount of information from the server instead of the entire page.
How AJAX Works
Ajax enables the Internet application program Smaller, faster, friendlier.
Ajax is a Web independent Server software Browser technology. Ajax is based on the following Web standards:
JavaScript, XML, HTML, and CSS The Web standards used in Ajax have been well defined and supported by all major browsers. Ajax applications are browser and platform independent.
Web application Desktop applications There are many advantages; They can involve a large number of users. They are easier to install, maintain, and develop.
However, Internet applications are not as sophisticated and friendly as traditional desktop applications. With Ajax, Internet applications can become more complete and friendly [4]

application

Announce
edit
Framework application and thinking about ajax framework
This technology was applied around 1998. The first component that allows client script to send HTTP requests (XMLHTTP) is Outlook Written by the Web Access team. This component originally belonged to Microsoft Exchange Server And quickly became part of Internet Explorer 4.0. Some observers believe that, Outlook Web Access is the first successful commercial application that has applied Ajax technology, and it has become the core of many products, including Oddpost's online mail products Leader However, in early 2005, many events made Ajax popular. Google uses asynchronous communication in its famous interactive applications, such as Google Google Maps Google search suggestions Gmail Etc. The word Ajax was created by the article Ajax: A New Approach to Web Applications. The rapid spread of this article has strengthened people's awareness of using this technology. In addition, for Mozilla/ Gecko The support of makes the technology mature and easier to use.
The prospect of Ajax is very optimistic, which can improve system performance , optimization user interface Ajax Pro, an existing direct framework for Ajax, can be introduced into Ajax Pro. 2 .dll File, you can directly call the method of the background page in the foreground page JavaScript. But this framework is Form Validation There are conflicts. in addition Microsoft Ajax components have also been introduced. You need to add the AjaxControlToolkit.dll file. Relevant controls can appear in the control list. [1]

development

Announce
edit
Using ajax j2ee to develop organizations
Many important technologies and Ajax development patterns can be obtained from existing knowledge. For example, when sending a request to Server Must include the request order priority , timeout response error handling And callbacks, many of which have already been included in the Web service. At the same time, as the technology matures, there will be many areas to be improved, especially UI Part of the ease of use.
Ajax development and traditional B/S Development is very different. These differences introduce new programming problems. The biggest problem is ease of use. Because Ajax depends on the browser's JavaScript And XML, browser's compatibility And supported standards have also become Runtime Performance is also important. Most of these problems come from the combination of browser, server and technology, so you must understand how to best use these technologies.
Integrating various changing technologies and Strong coupling Customer server environment, Ajax proposes a new Development mode Ajax developers must understand the traditional MVC Architecture, which limits the boundaries between application layers. At the same time, developers also need to consider the external aspects of the B/S environment and use Ajax technology to reshape MVC boundaries. most important of all, Ajax developers must not consider Web applications as a collection of pages, but as a single page. Once the scope between UI design and service architecture is strictly separated, developers need to update and change the technology set. [1]

characteristic

Announce
edit
The biggest advantage of using Ajax is that you can maintain data without updating the entire page. This allows Web applications to respond to user actions more quickly and avoids sending unchanged messages on the network.
Ajax does not require any Browser plug-in , but users are required allow JavaScript Execute on browser Like DHTML application program So, Ajax applications must be rigorously tested on many different browsers and platforms. With the maturity of Ajax, some Library They also came out one after another. Similarly, another kind of auxiliary programming technology has also appeared, for those who do not support JavaScript 's users provide alternative functions.
The main criticism of applying Ajax is that it may destroy the browser's ability to back and add bookmarks to favorites. When the page is dynamically updated, the user cannot return to the previous page status, because the browser can only record History In Static page A page that has been read in and a page that has Be dynamic The possible differences between modified pages are very subtle; Users usually want to click the back button to cancel their previous operation, but in Ajax applications, they cannot. However, developers have come up with various ways to solve this problem, Most of the methods before HTML5 are to reproduce changes on the page by creating or using a hidden IFRAME when the user clicks the back button to access the history. (For example, when a user clicks Back in Google Maps, it displays a hidden IFRAME And then reflect the search results on the Ajax elements to restore the application state to the current state).
For the problem of unable to add the status to the collection or bookmark, One way before HTML5 was to use URL fragments identifier (commonly referred to as Anchor point , that is, the part after # in the URL) to keep tracking and allow users to return to a specified application state. (Many browsers allow JavaScript to dynamically update the anchor, which enables Ajax applications to update the anchor while updating the display content.) HTML5 can Direct operation Browse the history and use character string To store web page status in form and add web pages to web pages Favorites Or bookmarking will be hidden. The above two methods can also solve the problem of no retreat at the same time.
When doing Ajax development, Network delay ——That is, the interval between the user sending a request and the server sending a response - needs careful consideration. Users will be bored if they do not give clear responses, do not properly read data in advance, or do not properly handle XMLHttpRequest. The common solution is to use a visual component to tell the user that the system is performing background operations and reading data and content. [2]