Author: EASYJF Open Source Team (www.easyjf.com) Big Gorge
Some enthusiastic gurus even predict that Ajax will change and potentially replace the traditional web development model. Let a lot of just learn jsp, struts newbie (novice) even doubt whether they have cast the wrong tires, choose the wrong way.
Ajax is used only in the right place, and it requires a lot of data processing (acting as a notification mechanism) in the background, and it takes time to read data from the server frequently, periodically or irregularly.
For example, we often contact the e-mail system, because the e-mail system is generally composed of e-mail servers and clients, when users log in to the e-mail system via the Web, the Web server needs to collect mail from the mail server, the process of the message is sometimes relatively long, And when the user read the message in the process of the occasional new messages appear. The use of AJAX technology in these systems, you can log in when the user does not have to collect all the mail information on the return of the client, while the server-side constantly from the mail server to detect and search for mail, and Ajax clients to start a timed refresh continuously from the server read information, Once a new message is found, it can be reflected directly in the user's web interface.
If you do not use Ajax, you have to read the new server information needs to refresh the page, you can set some of the IFRAME, such as the way to deal with, but because Ajax passed back the structured XML data information, so it can be very good through the JAVASCRITP data processing.
In the chat room system often used, the truth ibid and easier to understand!
In addition, Ajax is also used in the Web page Modal dialog box (that is, the window.showModalDialog method pop-up new page), because the modal dialog box if you need to submit data to the server, it is not directly with form submission, so through the Ajax technology to submit more convenient.