Comment on the development and architecture of Flex combined with Java EE

Source: Internet
Author: User

1 Flex Introduction

FLEX, a rich Internet applications-era cow x product Rich Internet applications, is translated into Chinese for rich Internet applications. The development of traditional network program is based on the page, server-side data delivery mode, the network program is based on the presentation layer on top of the HTML page, and HTML is suitable for text, the traditional web-based system has gradually failed to meet the network browser's higher, all-round experience requirements, This is what the Macromedia Company calls "experience problems", and the advent of rich Internet applications is to solve this problem.

The two most important technologies for Flex are the AS and MXML, MXML and HTML are markup languages, which describe the user interface that reflects content and functionality. Unlike HTML, MXML can provide a declaration abstraction for presentation-layer logic and user interface and server-side data binding. MXML can completely separate the presentation from the business logic to maximize developer productivity and application reuse. MXML's development is based on iterative processes, which are the same as other types of Web application files, such as HTML, JSP, and ASP. Developing a MXML application is as simple as opening a file editor, simply by entering some labels, saving the file, and then opening the file URL on the Web browser.

MXML files are also common XML files, so you can choose a variety of development environments. Can be developed in a simple file editor, a dedicated XML editor, or an integrated development environment (IDE) that supports file editing. Because MXML conforms to the definition of the consortium's XML schema, you can also use structured editing, such as code coloring and code hints.

The biggest difference between Mxml and HTML: the first defined application is a compiled SWF file that executes in the Flashplayer client. The latter is based on the application of page technology. As a result, the former can provide richer, dynamic UI. Mxml does not support some features of Flash, such as the timeline. However, you can use Flash to design components and apply them in flex. The Mxml application can be a mxml file or multiple mxml, Mxml support custom components in the form of mxml files, custom components in the form of ActionScript files, and custom components created in Flash.

Flex attempts to develop animations and RIA applications faster and simpler than ever before by providing a workflow and programming model that programmers already know well. In the multilayer development model, the flex application belongs to the performance layer. Flex's language and file structure also tries to separate the logic of the application from the design

In short, flex is a good direction for future interface development, as far as I know many companies require employees to learn flex technology, visible flex popularity.

2 ActionStript3.0 Characteristic Introduction

ActionScript is a programming language for Adobe Flash Player runtime environments that enables interactivity, data processing, and many other features in Flash content and applications, and ActionScript is actio by Flash Player Nscript virtual Machine (AVM) to perform. ActionScript code is usually compiled into "bytecode format" by the compiler, somewhat similar to the Java processing and running mechanism. Friends who have changed C#,java and JavaScript programs can certainly find the shadow of these languages in ActionScript.

2.1 Built-in namespaces and custom namespaces

Four built-in modifiers:

Public: Visible to all code

Private: visible only within class

Internal: Visible only in the same package where the definition resides

Protected: Visible to subclasses of the same package and different packages

Custom namespaces: Define namespaces using keyword namespace, and apply namespaces when declaring properties and methods.

As code:

1Namespace testSpace="org.blogjava.jm/ testSpace ";
2
3testSpace myfunction2():void{}
4
5 调用使用 use 关键字打开命名空间
6
7use mySpace2;
8
9myfunction2();

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.