Ajax in action

Source: Internet
Author: User

Like others, I was surprised when I saw the RIA application, such as Google Maps and Google suggest. I want to know how it is implemented. Now, the answer lies in Ajax. This was only known after I spent some time studying Ajax. Here is a good example to let us know how Ajax is well applied in javarss.com.

Ajax (Asynchronous JavaScript and XML) is a programming technology that allows Java-based Web ApplicationsProgramJava technology, XML, and JavaScript are combined to break the page overload paradigm. 

In the Ajax solution, ecmascript, which is a javascript extension, is used to parse XML files. Therefore, it is also called (ecmascript for XML, E4X ). The introduction of this technology makes parsing XML in Javascript very simple. If there is Asynchronization, there will naturally be synchronization. Our traditional network applications are officially based on synchronous transmission, and users send requests-> server logic processing-> servers respond to user requests to complete display. This is the complete process for a user to access an application or webpage. The user has gone through three waiting processes from making a request to the end of the request. It seems that this is an unchangeable reality in the traditional solution. However, is it true that AJAX not only provides us with a brand new idea, but also challenges traditional solutions.

What Is Ajax:Ajax is an architecture and not a technology. Ajax represents Asynchronous JavaScript and XML.

Punch line ):Delayed Loading

Problem:When the javarss.com homepage is loaded, it also loads the description of all entries (if you have activated it in the settings ). These introductions are displayed only when you move the cursor over the entry.

The problem now is that it is impossible for the user to move the mouse over all entries, so loading all the introductions in advance is not a good idea.

Solution:Ajax allows you to dynamically load entries from the server when you move the mouse over the server.

In this way, the initial page size can be reduced by half or more, so that the page loading is faster and a better user experience can be achieved.

Sequence diagram:

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.