Developing interactive Web applications using Flex and Dojo

Source: Internet
Author: User

Introduction: This article is divided into four parts, first of all, briefly introduce the architecture of interactive WEB applications, analyze the use of Dojo technology and Flex technology, and then use a concrete example to describe the development of FLEX applications and the integration with traditional Web projects, followed by an example to explain how the Web client Using dojo technology and how to interact with the backend services, finally analyze the feasibility and advantages of using this pattern in interactive WEB applications in conjunction with the Flex Technology and dojo technology. Through this article, the reader can clearly understand the need for the use of Flex and dojo, feasibility and corresponding application scenarios, on the other hand, I believe that the reader can follow the example described in the steps and some experience skills to quickly apply the flex and dojo technology to the original traditional WEB applications To.

Introduction

Interactive WEB applications that are core to the user experience are an integral part of industry solutions, with emerging Ajax technologies and Flex technologies making it easier for developers to create outstanding, rich-Internet applications (RIA). As the representative of Ajax technology, Dojo is one of the most powerful JS frameworks, providing an extremely complete callable library, supported by IBM and widely used in IBM products; Flex describes the look and behavior of the application by providing the developer with object-oriented programming.

Flex and Dojo Introduction

Flex describes the look and behavior of the application by providing object-oriented programming for developers, using a more standardized and standardized MXML language than HTML, and finally merging the MXML with ActionScript to build the SWF file into the Web client. Because Flex is biased towards developers and contains a rich library of components, it is easier for developers to create outstanding rich Internet applications. The following is a brief introduction to two key technologies in Flex:

MXML is an xml-based user interface Markup language that is used primarily to lay out and add components to Flex applications, MXML also for access to server-side data sources and data binding between user interface components and data sources. It allows developers to create animations, states, transformations, and styles, and is well extensible, allowing developers to easily create reusable components.

ActionScript is a ECMAScript scripting language, and in Flex, ActionScript allows you to add interactivity to your application.

Dojo is an object-oriented, open source JavaScript Toolbox. It provides a complete set of widgets and some special effects for developing WEB rich client programs.

Based on the respective features and advantages of Flex and Dojo, in order to better meet the needs of users and provide a good user experience, the interactive Web application described in this article will adopt the following strategies, where the more interactive picture processing parts will be implemented through Flex, while the more real-time pictures, The text Information update and Interaction section is implemented through Dojo.

Application model and interactive mode

In the traditional three-tier architecture, it can be seen that either the business logic layer changes or changes to the database will not affect the other layer of the two or only have a very small impact, it can be said that the database and programming language is basically complete understanding coupling; But further thinking will clearly identify such a problem, When the outside world needs the system to upgrade or change the business logic layer, it will directly cause the existing performance layer to change almost completely, this problem is unavoidable in the traditional three-tier architecture.

The emergence of RIA can greatly alter this shortcoming. This is because, in the RIA application model, the business functions can be encapsulated and provided to the client in a way that the client does not need to focus on the implementation of the function, whether Javascript,dojo or Flex, rather than focusing on the user's interactive experience; On the other hand, RIA The application's client only by the browser and the plug-in structure, the user interface height unification, the application promotion, the change has almost no influence to the user, the user does not need the client to carry on the promotion, the extension and so on operation. This article will follow the model of an existing RIA application, as follows:

Figure 1. Application Model

To achieve the goal of dynamic interaction between the presentation layer and the server side, the approach is that the generated SWF file compiled by Flex Builder can provide a high-performance access to the Flashplayer and the server through an AMF protocol or an XML approach; Json-rpc to invoke the server-side Java object asynchronously. The specific implementation will be described in the following examples.

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.