2 Replies Latest reply on Jun 13, 2009 1:51 PM by Miggl

    How to have Multiple Configurations for a Flex Application

    Miggl Level 1

      Hi All,

       

      I've seen this question asked in various forms multiple times, but never answered: How do you set up a FLEX configuration to have different configurations for development (local), test server, staging server, beta server, and production server? I cannot imagine that Adobe has not accounted for this, something that is very standard in most development teams. Zend Framework has a very elegant solution for this: in the configuration file you define all aspects that can be configured, as well as the various environments (development, staging, beta, live, etc.). Then, in the bootstrap file you specify which environment you want to work in, and you're all set.

       

      How can something like this be achieved in FLEX?

       

      Many thanks!

      -Mike

        • 1. Re: How to have Multiple Configurations for a Flex Application
          Flex harUI Adobe Employee

          Are you specifically referring to Flex/FlashBuilder?  ANT and conditional compilation should let you do just about anything you want.

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: How to have Multiple Configurations for a Flex Application
            Miggl Level 1

            Maybe my setup is unconventional, I doubt it, though:

             

            1) SVN repo stores FLEX and PHP codebases in separate projects.

            2) Developer gets code from repo, and runs on local machine. -> need to configure FLEX to point to local PHP code here for Remote Objects.

            3) Developer then publishes Flex app to staging server. -> need to configure FLEX to point to staging PHP code here.

            4) Flex app then gets published to live server. -> need to configure FLEX to point to live PHP code here.

             

            Now, using ANT, the scenario would look like this:

             

            1) SVN repo stores FLEX and PHP codebases in separate projects.

            2) Developer gets code from repo, and runs on local machine. -> need to configure FLEX to point to local PHP code here for Remote Objects.

            3) Code is good and developer checks it back into SVN.
            4) ANT extracts latest build from SVN and builds it, then publishes to staging server. -> need to configure FLEX to point to staging PHP code.
            I am using PHPUnderControl as my build server for PHP.
            I am also unclear as to how my goal could be achieved using ANT?
            Thanks!
            Mike