The difference between traditional web development patterns and Ajax development patterns

Source: Internet
Author: User
Tags postgresql redis





1. Workflow of traditional Web development mode:



The traditional Web development model is a synchronization concept. The user must wait for each request, when a request completes, a new request is made before the result is used. For example, when a user requests an article, he will definitely read the article before going to get other data, otherwise the current article page will be refreshed, Unable to read. It is completely a request---> Refresh---> Response model, the user can only wait for the completion of the user operation, the operation is completed before submitting the next request, user behavior and server behavior is a synchronous relationship.



2. ajax Development Mode Workflow:



The Ajax development model is an asynchronous concept. This means that the client and server side do not have to wait for each other, but rather do a concurrent operation. The user can continue to work on the current job, including browsing or submitting information, after the request is sent again. After the server response is complete, the AJAX engine displays the updated data to the user, And the user determines their next behavior according to the response content.



There is an extra layer of Ajax engine on the user's behavior and server side that handles the user's behavior and translates to server requests. At the same time it receives server-side information, which is processed and displayed to the user.



3. The advantages of using AJAX is not much to say, the following is the disadvantage of its



A:ajax communication is often a piece of data, such as a xml.html fragment, or plain text, which is not a complete HTML document and is retrieved asynchronously through the background and cannot be discovered and cached by the search engine.



B:ajax transfer a large number of operations from the server side to the client, meaning that the browser will bear a greater burden, no longer a simple document display. The core language in Ajax is JavaScript, which, as an interpreted scripting language, does not run very efficiently. and relies on different browsers to implement





The Server (in traditional mode, which provides HTML, images, CSS, or JavaScript) will be configured to return its available data to the AJAX engine, which can be plain text, XML, or any format required, and the only requirement is that the Ajax engine understand and translate this data. 


When the AJAX engine receives a response from the server, it triggers actions that typically complete data parsing and make some modifications to the user interface based on the data it provides. Because the information delivered in this process is much less than the traditional Web application model, the user interface will update faster and users will be able to do their work faster. Figure 1-1 is modified on the basis of the Garrett article, which illustrates the difference between the traditional Web application model and the AJAX model.


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.