Some common problems solved by AJAX applications

Source: Internet
Author: User
Tags interface access
ajax| Solve | The problem

Undeniably, I am very optimistic about Ajax technology. I thought Ajax technology for the Internet, just like HTML for the Internet. But at the same time, Ajax technology cannot completely replace our conventional web development technology. Ajax technology has the advantage of making people's eyes bright, and it also has many weaknesses.

As a developer, we cannot use Ajax for all of our web development because of Ajax technology.

By the way, Ajax is not for Ajax, just as steel is used to the edge, Ajax should be used where it can give full play to its advantages. And most of the time, we also need to use MVC to implement struts development framework as usual.

Referring to Ajax, one cannot but mention another word that is emphasized together with it: the user experience. Ajax enriches the B/S model of the performance layer, for the B/S model of the UI, it claims that there is no, only unexpected. It all boils down to a user experience problem. Ajax is not known as refreshing, in fact, many times, users need to have a refresh to know that there is a page submission, such as when saving data, so at this time using Ajax is harmful to the user experience.

So when is it possible to use Ajax? First, the request is submitted for the display of page data, when users generally do not want to see the page refresh, is the use of Ajax a best time. Second, if the request submitted, users can feel from the page to submit results, this time, it is also best not to have page refresh, the recommended use of AJAX technology. Third, if the request is submitted, the user can not feel from the page to submit action, such as most of the time the increase and modification of data, then the need for page refresh, can not use AJAX technology. Four, complex UI, previously for the complex C/s mode of UI,B/S mode has always been a way to escape, now can be assured of bold use Ajax to solve.

The practice of Ajax technology, like magic, once you use it, you will love it. What are you waiting for in the face of wonderful Ajax technology? Take a quick look at your Web application, there is no one of the following questions, if any, you might as well use Ajax to try!

first, the problem of the input value checksum.

Input checksum is a problem that we often encounter, this kind of problem many times can be solved in JS. But sometimes it is necessary to access the background, such as when the user to check the user name is repeated and so on. With Ajax, the page will not be refreshed.

Second, the cascade display problem.

This problem should be the most expressive layer of problems we encounter, often let us dilemma: You say to visit the background bar, the page needs to refresh, the user experience is very bad; you say with JS to solve it, really a bit to let JS reluctantly, forced to use JS solved, the code a lot of not to say, the data volume of words will also have memory problems, And the data is not safe.

There are many problems with this category: The most common is cascading two or more selection boxes, as well as the selection of the box variants, cascading menus, navigation trees and so on.

Meet this kind of problem, hurry up and ACT! Use Ajax to access the background, neither need to refresh the page, there is no excessive JS code, kill both birds.

third, the request result only changes the partial page.

This kind of problem we will often encounter, such as the Forum's reply posts and the list of posts on a page. The two UI on one page, the user experience is better than replying to a post on another page. But after replying to the entire page to refresh, this feeling is not good. You see, so big a list of posts, only to increase your one reply, but to the entire page to refresh, no matter from which point of view is not good.

This kind of problem, whether it's a user experience or a technical point of view, is the best use of Ajax.

the problem of using IFRAME for technical reasons.

The problem of IFRAME is purely due to technical reasons. In order to solve technical problems and the introduction of IFRAME, but the repeated nesting of IFrame but also introduced other technical problems. Some try their best to settle the problem, others do not use the IFRAME altogether. Do not use IFRAME, but the use of JS solution is cumbersome. There's no need to be in the middle of a dilemma, using Ajax is the best solution.

Fifth, data entry and list display on the same page.

c/S mode of the UI often have data entry and data list displayed in the same interface, so that users have a very good user experience, user input results can be displayed immediately in the same interface. However, in the B/S UI, due to the need to submit a refresh problem, we often put data entry and data display on two separate pages. Obviously, such user experience certainly does not have C/s mode to come good. There are many problems like this, in B/S mode, all because of technical reasons and choose other solutions. Now we can proudly use Ajax to announce that we can make the same complex UI as the C/s pattern.

Page Six.

Would you like to try it if there is technology to make it unnecessary to refresh the page? There are a lot of such data to show that the problem needs to be refreshed Oh, consider ajax!



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.