
58 Building a Flex Application
The main MXML file contains the <mx:Application> tag. For more information, see
Chapter 6, “Using MXML,” on page 85.
Upon receiving an HTTP request for an MXML file, Flex performs the following steps:
1. Compiles the MXML file to produce a SWF file.
2. Caches the compiled SWF file on the server.
3. Returns the SWF file to the client.
Upon subsequent requests to the MXML file, the Flex server determines whether the MXML
file has been modified since the previous request. If not, it returns the same SWF file from the
cache. If the MXML file has been modified, the Flex server recompiles the file and returns an
updated SWF file to the client.
The Flex programming model
Flex contains the Flex class library, and the MXML and ActionScript programming languages,
as the following figure shows:
Also included in Flex, but not shown in this figure, are the Flex compilers and Flex debugger.
You write Flex applications using a combination of MXML and ActionScript. The MXML
and ActionScript programing languages both give you the ability to access the Flex class
library. Use MXML to declaratively define the application user interface elements and use
ActionScript to define client logic and procedural control.
The Flex class library contains Flex components, managers, and behaviors. With the Flex
component-based development model, developers can incorporate prebuilt components,
create new components, or combine prebuilt components into composite components.
Flex
MXML ActionScript
Flex Class Library
Commenti su questo manuale