SoFunction
Updated on 2025-04-02

What is flex? Introduction to Flex

flex usually refers to Adobe Flex, which was originally released by Macromedia in March 2004, based on its proprietary Macromedia Flash platform, which covers a range of technologies that support RIA (Rich Internet Applications). Another meaning of flex is a tool for generating scanners that can recognize lexical patterns in text.

Introduction to flex
Flex is an efficient, free, open source framework for building expressive web applications that leverage Adobe Flash Player and Adobe AIR to runtime for consistent deployment across browsers, desktops, and operating systems. While only Flex applications can be built using the Flex framework, the Adobe Flash Builder™ (formerly known as Adobe Flex Builder™) software can speed up development with features such as intelligent coding, interactive traversal debugging, and visual design user interface layout.

RIAs created with Flex can run in browsers using Adobe Flash Player software or outside the browser on Adobe AIR running across operating systems, which can run consistently across all major browsers on the desktop. More than 98% of computers connected to the Internet have Flash Player, an enterprise-level client runtime, and its advanced vector graphics can handle the most demanding, data-intensive applications while achieving the execution speed of desktop applications. By leveraging AIR, Flex applications can access local data and system resources.

Macromedia Flash is a powerful vector animation editing tool. After starting out in animation, Flash has been seeking the dominance of RIA (rich internet application) rich client. The most influential is that it has launched the object-oriented programming script ActionScript3.0, and has established a class library similar to java swing and corresponding component (component). Flex interprets .mxml files through non-Flash channels such as java or .net and generates corresponding .swf files. Flex's component and flash's component are very similar, but have improved and enhanced. The current (November 2011) flex version is 4.6.

Using Flash can achieve the effect of flex, why do you still need flex? There are two reasons for this:

1: To cater to more developers (developers). Flash is born for designers (designers). The interface and the animation concept of flash are incompatible with program developers. In order to attract more programmers such as jsp/asp/php, Macromedia launched Flex, which uses very simple .mxml to describe the interface for jsp/asp/php programmers. (x/d)html is very similar, and mxml is more standardized and standardized.

2: For a standard. You must have heard of Microsoft's operating system vista (the subsequent win7 is also the same core). At the same time as vista was launched, Microsoft also launched a new language xaml, an interface description language. The corresponding one is something very similar to smart client and flex (i.e. SilverLight). Mxml and Xaml are also very similar... This is an important manifestation of the advancement of human-computer interaction technology, that is, the interaction between internal logic and external interface is separated.

Flex and j2ee/.net actually have nothing to do with it. Macromedia uses Java to create an application to integrate flash technology into J2EE, and then uses .net technology to create a .net application to integrate flash technology into .net; it should be said that flex solves the most complicated problem in J2EE and .net, which is the problem of the web client.

Flex Growth History

Causes
Traditional programmers have difficulties in developing animation applications, and the Flex platform was originally created. Flex tries to improve this problem by providing a workflow and programming model that programmers are already familiar with.
RIA relations
Flex was originally published as a J2EE (Java 2 Platform, Enterprise Edition) application, or as a JSP (JavaServer Pages) tag library. It can compile running MXML (Flex markup language) and ActionScript into FLASH applications (i.e. binary SWF files). The latest version of FLEX supports the creation of static files that use interpreted compilation methods and can be deployed online without purchasing a server license.
Flex's goal is to enable programmers to develop RIA applications faster and easier. In the multi-layer development model, Flex applications belong to the presentation layer.
Flex is developed using the GUI interface and uses an XML-based MXML language. Flex has a variety of components, which can implement functions such as Web Services, remote objects, drag and drop, column sorting, charts, etc.; FLEX has built-in animation effects and other simple interactive interfaces, etc. Compared with HTML-based applications (such as PHP, ASP, JSP, ColdFusion, CFMX, etc.), server-side templates need to be executed at each request. Since the client only needs to be loaded once, the workflow of the FLEX application has been greatly improved. FLEX's language and file structure also attempt to separate the logic of the application from its design.
The Flex server is also a communication path between clients and XML Web Services and remote objects (Coldfusion CFCs, or Java classes, and other objects that support Action Message Format).

Generally considered a Flex alternative are OpenLaszlo and AJAX technologies.

Version History
Flex 1.0-March 2004
Flex 1.5-October 2004
Version
Flex 2.0 (Alpha) - October 2005
Flex 2.0 Beta 1-February 2006
Flex 2.0 Beta 2-March 2006
Flex 2.0 Beta 3-May 2006
Flex 2.0 Final-June 28, 2006
Flex 2.0.1 - January 5, 2007
Flex 3.0 Beta 1 - January 11, 2007
Flex 3.0 Beta 2 - October 1, 2007
Flex 3.0 Beta 3 - December 12, 2007
Flex 3.0 - February 25, 2008
Flex 3.1 - August 15, 2008
Flex 3.2 - November 17, 2008
Flex 3.3 - March 4, 2009
Flex 3.4 - August 18, 2009
Flex 3.5 - December 16, 2009
The final official version of Flex4 - March 22, 2010

Flex application prospects

Advantages
As the leader of the new generation of rich client Internet technology, Flex technology has been adopted by more and more companies and accepted by more and more users and programmers. The following are the top ten advantages of Flex:
1. Flex and Flash: It can make it possible for ordinary programmers to develop and produce Flash
2. First-class interface performance ability.
3. RIA rich client application solves many problems such as asynchronous calls, no refresh interface, browser compatibility, etc.
4. Support for streaming media: Flex is recognized as the best application for streaming media technology support.
5. Platform availability: According to ADOBE, Flash player is installed on half of the world's PC machines at 99.8%
6. Cross-platform: Flash player can run on Linux or on mobile phones, so don't worry about being tied to WINDOWS
7. Operability to the underlying layer: Flex can call the underlying layer, such as calling the camera to implement video, and the video itself is embedded in the Flex application and is played directly by the Flex player.
8. The platform's subsequent operation and development prospects: Flex was launched by ADOBE and is open source
9. There is a sufficient learning environment: Flex official style configuration tool, which can configure the appearance styles of various controls of Flex application online, and the program modification is also written in Flex. You can imagine how much Flex can be applied. Moreover, such a beautiful interface does not need to be used as any pictures or artists at all, but can be implemented directly with styles.
10 You can use any WEB programming platform you are familiar with as the backend data access layer, and you can use .net, php, jsp, webservice.

Adobe RIA Technology

The development of traditional network programs is a page-based and server-side data delivery model, which establishes the presentation layer of network programs on HTML pages, and HTML is suitable for text. Traditional page-based systems have gradually been unable to meet the higher and all-round experience requirements of web browsers. Rich Internet Applications (abbreviated as RIA) emerged to solve this problem.

RIA is for users

Rich Internet Applications is the next generation of web applications that combines the interactive user experience of desktop applications with the deployment flexibility and cost analysis of traditional WEB applications. Rich client technology in rich Internet applications provides an operating environment that can host compiled client applications (passed in files in the form of HTTP), which uses an asynchronous client/server architecture to connect to existing back-end application servers. This is a secure, upgradeable, and well-adapted new service-oriented model driven by the WEB service adopted. Combining integrated communication technology with sound, video and real-time conversations gives Rich Internet Applications (RIA) an unprecedented online user experience.
Adobe RIA technology packaging has greatly retained the existing WEB technology. The core value lies in greatly improving the "development experience" of product designers and development engineers, and strengthening the integration of the design end and the development end. Designers and development engineers can easily translate their code to new platforms, and publish and deploy them is much more convenient than any previous development tool, thus giving RIA applications a wider developer base.
Adobe RIA technology will also bring a new desktop - "Desktop 2.0", which includes content from Flash, HTML/CSS/JS, to PDF, almost covering the most popular WEB content carriers nowadays. In addition, the "offline" application mode allows users to work and play more safely and comfortably. Users no longer have to complain about the information loss caused by network failure, and they can also use local resources to better save network resources. Therefore, Adobe RIA technology can allow users to bring WEB 2.0 applications back to the desktop, creating commercial application value and user experience value that will exceed any previous technology.

position
In November 2011, adobe announced that it will no longer support new version upgrades for flash player on mobile browsers. It is also recommended that developers use html5 instead of developing mobile programs.
By December 2011, adobe commentary had moved some internal developers to html5 research, but promised to continue to support flash technology. In the long run, adobe may gradually abandon other traditional flex/flash fields in the future.

Classic Applications

1、eBay
eBay Desktop is an application built on Adobe AIR that creates a persistent connection to eBay customers. eBay desktop directly publishes product supply notifications and auction updates to buyers in real time, so that users can get the latest information without opening a browser to enter the eBay website.
2. Nasdaq Stock Market Company
NASDAQ Market Replay uses Adobe Flex and Adobe AIR to release a RIA on the desktop, allowing financial professionals to replay details of market activities at any point in time.

The relationship between Flex and Flash

First of all, I want to say here that Flash is not just a simple vector animation creation tool, but a web application development tool that evolves in function and positioning with the scripting language ActionScript. As early as Flash MX, it has become a tool for macromedia to promote RIA strategy. But after all, Flash's initial positioning was a vector animation creation tool for art animation designers, and it is not suitable for traditional developers. So Flex became the first choice for developers.

With FLASH

Both Flex and Flash use ActionScript as their core programming language and are compiled into swf files to run in the Flashplayer virtual machine. Therefore, Flex also inherits the innate beauty of Flash on the presentation layer. In addition to visual comfort, it also has a natural and convenient vector graphics, animation and media processing interface.

Although Flex and Flash have many similarities, there are still many differences:
1. Although public ActionScript, the libraries used are not exactly the same. It is more appropriate to say that the two use two sets of libraries with a huge "functional overlap" range.
It is biased towards art animation designers, so it is easier to take advantage of the special effects processing. Flex is biased towards developers, so it is easy to make applications with rich interactive functions.
It can only be developed in the form of ActionScript scripts (the stage is associated with a class called document class). In addition, stage elements can also be bound to scripts. However, from the perspective of software engineering, this is not recommended. Flex can also use markup language called mxml to describe the appearance and behavior of the application. ActionScript scripts can be directly embedded in mxml.
4. The market positioning of the two is different due to the third point. Flex is an enterprise-level network application, while Flash is an online display program such as graphic animation and advertising design.
5. With Flash Player on mobile devices, Flash can develop mobile applications, but Flex cannot.
The programming model is based on the timeline, while Flex is based on the form, although it runs on the web page.

Flex's technical composition technology framework

Flex technology includes the following main technical frameworks:
1. Describe the XML language (MXML) of the application interface;
2. A scripting language (ActionScript) that complies with ECMA specifications, handles user and system events, and builds a complex data model;
3. A basic library;
4. Instant service at runtime;
5. A compiler that generates swf files from MXML and ActionScript files.

Development steps

The following directly comes from the help files of Flex 2.0 Beta 3:
Use a system predefined component (windows, buttons, etc.) to define a development interface.
Organize components, now user-defined interface design.
Use style and theme to define visible designs.
Add dynamic actions, such as interactions between applications.
Define and connect to the previous data service if needed.
Generate a SWF file running in the Flash player from the source code.

Flex related certification introduction