Introduction to Ajax Technology (1)

Source: Internet
Author: User
Tags end interface object model
Ajax

As Java EE developers, we often seem to be concerned about the "back-end mechanism (backend mechanics)." We often forget that the main success of Java EE is in Web applications, and many reasons make people like to use web development applications, but primarily because of their ease of deployment, they allow the site to have millions of users at the lowest possible cost.

Unfortunately, over the last few years, we've spent too much time on the back end, but not enough to make our Web user interface responsive to the nature and responsiveness of our users.

This article describes a method, Ajax, that you can use to build a more dynamic and responsive Web application. The key to this approach is the combination of JavaScript, DHTML, and asynchronous communication with the server on the browser side. This article also demonstrates how easy it is to enable this method: An AJAX framework (DWR) is used to construct an application that communicates directly from the browser to the backend service. If used properly, this powerful force can make the application more natural and responsive, thereby enhancing the user's browsing experience.

The sample code used in this application has been packaged as a separate war file for download.

Brief introduction

The term Ajax is used to describe a set of techniques that enable browsers to provide a more natural browsing experience for users. Before Ajax, the Web site forced the user into the Submit/wait/display paradigm, and the user's actions were always synchronized with the server's "Think Time." Ajax provides the ability to communicate asynchronously with the server, freeing users from the request/response loop. With Ajax, you can use JavaScript and DHTML to update the UI immediately when the user clicks the button, and to send an asynchronous request to the server to perform an update or query the database. When the request returns, you can use JavaScript and CSS to update the UI appropriately instead of refreshing the entire page. Most importantly, the user doesn't even know that the browser is communicating with the server: The Web site appears to be responding instantly.

While the infrastructure required for Ajax has been on for some time, the true power of the recent asynchronous request has not been exploited. Being able to have a very responsive web site is really exciting because it ultimately allows developers and designers to create "desktop-style (desktop-like)" Usability using standard html/css/javascript stacks.

Typically, in Java EE, developers are too focused on the development of services and persistence layers that the usability of the user interface is lagging behind. In a typical Java EE development cycle, it is often heard that "we have no time to put the UI" or "cannot be implemented in HTML." However, the following Web site proves that these reasons are no longer tenable:

    • BackPack
    • Google suggest
    • Google Maps
    • Palmsphere

All of these Web sites tell us that Web applications do not have to rely entirely on the reload of the page from the server to render changes to the user. Everything seems to happen in an instant. In short, the benchmark is set even higher when it comes to the responsiveness of the user interface.

Defining Ajax

Adaptive Path Company Jesse James Garrett this definition of Ajax:

Ajax is not a technology. In fact, it is a combination of several booming technologies in a new and powerful way. Ajax contains:

    • Based on the CSS standard representation;
    • Use the document Object model for dynamic display and interaction;
    • Asynchronous communication with the server using XMLHttpRequest;
    • Use JavaScript to bind everything.

This is great, but why do you want to name it Ajax? In fact, the term Ajax was created by Jesse James Garrett, who said it was "shorthand for asynchronous JavaScript + XML."

[1] [2] [3] [4] [5] Next page



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.