Adobe Flex 3 Help

Deployment options

The following example shows a typical deployment environment for a Flex application:

Typical deployment environment.

Deploying an application for Flex SDK and Adobe® Flex® Builder® might require you to perform some or all of the following actions:

  • Copy the application SWF file to your deployment server. As the previous example shows, you copy the application to webserver.example.com.
  • Copy any asset files, such as icons, media files, or other assets, to your deployment server.
  • Copy any RSLs to your web server or application server. For more information, see Deploying RSLs with Flex SDK.
  • Copy any SWF files for your module to your deployment server in the same directory structure as you used for your development environment. Deploying modules with Flex SDK.
  • Copy any SWF files required to support Flex features, such as deep linking. For more information, see Deploying additional Flex files.
  • Write a wrapper for the SWF file if you access it from an HTML, JSP, ASP, or another type of page.

    A deployed SWF file can encompass your entire web application, however it is often used as a part of the application. Therefore, users do not typically request the SWF file directly, but request a web page that references the SWF file. Flex Builder can generate the wrapper for you, or, you can write the wrapper. For more information, see Creating a Wrapper.

  • Create a crossdomain.xml file on the server for data service, if you directly access any data services outside of the domain that serves the SWF file. For more information, see Accessing data services from a deployed application

Deploying RSLs with Flex SDK

When your application uses an RSL, you must make sure to deploy the RSL on your deployment server, in the same domain, unless you are using cross-domain RSLs. You use the runtime-shared-libraries option of the Flex compiler to specify the directory location of the RSL at compile time. Ensure that you copy the RSL to the same directory that you specified with runtime-shared-libraries. For more information, see Using Runtime Shared Libraries.

Deploying modules with Flex SDK

Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules. When your application uses a module, you must make sure to deploy the module's SWF file on your deployment server in the same directory structure as you used for your development environment. For more information, see Creating Modular Applications in the Adobe Flex 3 Developer Guide.

Deploying additional Flex files

The implementation of some Flex features requires that you deploy additional files along with your application's SWF file. For example, if you use deep linking functionality in your application, you must deploy the historyFrame.html, history.css, and history.js files along with your application's SWF file. If you use express install version detection feature, you also must deploy the playerProductInstall.swf file with your SWF file. You typically deploy these files in the same directory as your application's SWF file.

For a complete list of additional Flex files that you might deploy with your application, see Deployment checklist.

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 application that is executing outside of your firewall.