User Guide

60 Chapter 4: Architecting Flex Applications
About the Flex development environment
You store Flex server code and application files in the directory structure of a standard web
application on a J2EE-compliant application server. The MXML deployment model is similar to
that of JavaServer Pages (JSPs). You create an MXML file in the text editor of your choice, and
place it in a web application directory that is accessible from a web browser. For example, you can
place MXML files in the web application root directory or a subdirectory other than the reserved
WEB-INF directory.
The directory structure of a typical Flex-enabled web application looks like the following:
Using Flex development tools
Flex provides the following tools to help you test, debug, and tune your applications during the
development process. To use these tools, the
<production-mode> setting in the .../WEB_INF/
flex/flex-config.xml file must be
false (the default):
<production-mode>false</production-mode>
If <production-mode> is set to true, Flex disables all debugging and profiling features. Flex also
ignores query string parameter overrides such as
?debug=true and ?asprofile=true when
<production-mode> is enabled.
Directory Description
web_app
(root directory or WAR root)
Contains the WEB-INF directory and all files that must be
accessible by the user’s web browser, such as MXML files, JSPs,
HTML pages, Cascading Style Sheets, images, and JavaScript
files. You can place these files directly in the web application root
directory or in arbitrary subdirectories that do not use the
reserved name WEB-INF.
/WEB-INF Contains the standard web application deployment descriptor
(web.xml) that configures Flex. This directory might also contain
a vendor-specific web application deployment descriptor.
/WEB-INF/flex Contains Flex configuration files.
/WEB-INF/flex/system-classes Contains ActionScript standard library stub classes that Flex use
internally for type-checking.
/WEB-INF/flex/user_classes Contains custom ActionScript classes and MXML components.
/WEB-INF/lib Contains Flex server code in Java Archive (JAR) files.
/WEB-INF/flex/frameworks Contains the SWC component file, builtin.swc, that contains the
Flex application framework files.