My friend asked me to introduce the benefits of Ajax. I thought about the following points:
1. This greatly reduces the data traffic on servers and clients. Unlike the submit-Responce era, a large amount of HTML scripts are required.
2. Enrich the client's corresponding information, such as the prompt input of the form Sub-segment and data verification. Multi-Level list implementation. Dynamic Loading of tree post menus, etc.
Note: When designing Ajax, you must consider the sequence of user interface events. 1. For some write operations, the interface lock function should be implemented as needed, that is, no other operations can be performed before the submission is complete. 2. A prompt such as load... is required for any operation.
Three Ajax forms
1. The original xmlhttprepuest method,
This method is the most flexible. You can freely access any Common Gateway Interface, return your own defined XML format, and display it through XML scripts. Of course, this is the most primitive method and is not suitable for large-scale applications.ProgramDevelopment
2. Javascript encapsulated function libraries
Protype, ricoajaxframework, and other Ajax libraries. They encapsulate most of the details of Ajax operations. You usually only need to write some handler, and then the server can return the corresponding XML in a fixed format.
Of course, there are also a lot of scripts for application development.
2.1 dojo and so on. A very abstract library redefines its own event distribution mechanism, but the interface is still HTML.
2.2 bindows, qooxoo and other JavaScript widgets, they use their own interface style, basically, it is difficult to integrate with the original website
Regardless of the Javascript library above, calling may cause some overload of browser loading, which is annoying.
Of course, if you use this method, you have implemented the second layer, namely, ajaxian.
3. automatically generate an Ajax access script with the tag library specified in the script language list and interact with the server.
DWe Java
Ajaxac PHP
In the form of encapsulation, javacript for Ajax operations is encapsulated to better implement component-Level Reuse.
If you have reached this step, you should have entered socialism.
4 of course, the intermediate goal is to dynamically load scripts and officialProgramming LanguageFor example, JSF can be combined, and then it can be dynamically changed by means of GUI. Implement real web application Ria.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 475118