Three Forms of AJAX (open-source projects)

Source: Internet
Author: User

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

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.