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.