Building Enterprise SOA AJAX clients Using Dojo Toolkit and JSON-RPC

Source: Internet
Author: User
Tags json object model dojo toolkit

Introduction

Asynchronous JavaScript and XML (AJAX) are new ways to build rich Web applications using native browser technology. JavaScript has done a good job for developers who write complex applications that require certain types of "active" user interfaces. However, JavaScript is difficult to encode, debug, migrate, and maintain. Using AJAX toolkits helps minimize many of the common problems with JavaScript and Ajax. The excellent AJAX Toolkit provides a reusable set of widgets, frameworks for extending and creating widgets, event systems, JavaScript utilities, and enhanced asynchronous server invocation support. In this article, we'll discuss how to use the Dojo Toolkit to build Enterprise SOA clients for Java EE applications. We will also use the JSON (JavaScript object notation) –rpc to invoke the server-side Java object.

In this article, we will also provide you with a brief description of Ajax, Dojo, JSON, and JSON-RPC, as well as some design principles for designing AJAX applications and brief examples that you can download and try to run yourself.

Ajax Overview

There are lots of papers, articles and books about Ajax. I'm not going to go into Ajax for an in-depth introduction. For more information, see Resources.

Ajax can be used as an architectural style for building Web sites using native browser components. The key parts of Ajax are:

JavaScript, which can orchestrate page elements to get the best Ajax user experience.

Cascading style Sheets (CSS), which defines the visual style of a page element.

Document Object Model (MODEL,DOM), which provides a web page structure as a set of programmable objects that can use JavaScript operations.

XMLHttpRequest, which supports retrieving data from Web resources in the form of background activity.

The XMLHttpRequest object is a critical part.

XMLHttpRequest objects

The XMLHttpRequest object is the mechanism by which Ajax is used for asynchronous requests. Figure 1 illustrates this process:

Figure 1. Flowchart for asynchronous requests by XMLHttpRequest objects

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.