The similarities and differences between Ajax and traditional Web development _ajax related

Source: Internet
Author: User
Tags html form

Ajax:

What is Ajax

Ajax, "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web development technology that creates interactive Web applications.

AJAX = Asynchronous JavaScript and XML (a subset of standard generic markup languages).

AJAX is a technique for creating fast-moving web pages. A small amount of data exchange with the server in the background

AJAX enables an asynchronous update of a Web page, meaning that a part of a Web page can be updated without reloading the entire Web page.

Features of Ajax

Based on web standards, use Document Object template for dynamic display and Interaction • Resolve page Data acquisition, server data resolution, no Refresh page update
Data exchange and related operations using XML and XSLT
Using XMLHttpRequest for asynchronous data querying and receiving • Solving asynchronous interaction problems
Use JavaScript to bind all things together • The bridge of other Ajax technologies, the main programming language JS Foundation. The advanced content of JS. JSON format

Way of thinking

User Experience

In traditional Web development, if you want information on a server-side database or file, or send client information to the server, you need to create an HTML form and then get or post data to the server side. Users need to click the "Submit" button to send or receive data information, and then wait for the server to respond to the request, the page reload. Because the server returns a new page each time, traditional Web applications can be slow and user interaction unfriendly. That is: View-> submit-> Wait-> new Page view-> new submission ... Page jump, full page refresh. User experience is interrupted

Using AJAX technology, you can enable JavaScript to interact directly with the server through XMLHttpRequest objects. With HTTP request, a Web page can send a request to a Web server and accept the information returned by the Web server (without reloading the page), the same page is displayed to the user, the user feels the page refreshed, You also do not see send requests and accept responses to the JavaScript background.

Ajax in the user experience aspect of the process: view-> submit-> Continue browsing-> old Page view-> new submission ... The page is not refreshed and the user experience is consistent.

Ajax uses asynchronous, traditional web is used for synchronization. Synchronous updates require an entire page to be updated and displayed as a new page.

Asynchronous updates are a small amount of data exchange between the background and the server, which makes it possible to update portions of a Web page without reloading the entire page. Ajax reduces the waiting time for users.

Development thinking

Traditional web PK Ajax approach

Expression

Disadvantages

Advantages:

1, through the asynchronous mode, the Web page without refreshing, enhance the user experience.
2, optimize the browser and the transmission between the server, reduce unnecessary data round-trip, reduce the bandwidth consumption.
3. The Ajax engine runs on the client, taking on a part of the work that was supposed to be done by the server, thereby reducing the load on the server under large user loads.
4, based on standardized and widely supported technology, do not need to download plug-ins or small programs.

Disadvantages:

1, Ajax does not support the browser back button.
2. Security issues Ajax exposes the details of interacting with the server.
3, the search engine support is weaker.
4, the failure of the program's abnormal mechanism.
5, not easy to debug.

The above is a small series to introduce the Ajax and traditional Web development similarities and differences, I hope you like.

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.