Specifications
CHAPTER 15
302
Accessing data services from a deployed application
In a typical Flex development environment, you build and test your application behind a corporate firewall, where
security restrictions are much less strict than when a customer runs the application on their own computer.
However, when you deploy the application, it runs on a customers computer outside your firewall. That simple
change of location might cause the application to fail if you do not correctly configure your data services to allow
external access.
Most run-time accesses to application resources fall into one of the following categories:
• Direct access to asset files on a web server, such as image files.
• Direct access to resources on your J2EE application server.
• Data services requests through a proxy. A proxy redirects that request to the server that handles the data
service request.
• Direct access to a data service.
As part of deploying your application, ensure that all run-time data access requests work correctly from the appli-
cation that is executing outside of your firewall.
Compiling for deployment
When you create a deployable SWF file, ensure that you compile the application correctly. Typically, you disable
certain compiler features, such as the generation of debug output, and enable other options, such as the generation
of accessible content.
This section contains an overview of some common compiler options that you might use when you create a
deployable SWF file. For a complete list of compiler options, see “Using the Flex Compilers” on page 125.
Creating a release build of your application in Flex Builder
When you create and run an application in Flex Builder, the Flex compiler includes debug information in that
application so that you can set breakpoints and view variables and perform other debugging tasks. However, the
SWF file that Flex Builder generates by default includes debugging information that makes it larger than the
release build of the SWF file.
To create a release build of your application in Flex Builder, select Project > Export Release Build. This compiles
a version of your application’s SWF file that does not contain any debug information in it. This SWF file is smaller
than the SWF files you compile normally. This also compiles any modules that are in the application’s project
without debug information.










