Expand my Community achievements bar.

Best practices: Programming for future deployment

Avatar

Level 1

Hi All.. I'm starting this thread to see if I can find a consensus about the best practices for programming for future deployment of Flex apps.

Using Flex Builder, in creating a simple portal app I use "Import Web Service (WSDL)" to make the ActionScript framework for webservices which I consume. I have coded those web services in .asmx (c# web services for .NET) and run them locally. The framework Flex Builder creates is just fine, and I can run my app locally with no problem. Where I run into an issue is deployment.

My intention is to distribute the database, the .NET webservices, and the Flex app as a complete solution to my end customers.

What are the best practices in programming for complete deployability?

The main issues I'm facing:

1. Using inbuilt features like "Import Web Service (WSDL)" creates a framework around a named webservice. Upon deployment the URL for these services will change. How can you make it easy to switch the site webservices are consumed from? Can Flex apps be set up to use an environment variable, or even read a local file for the URL of the webservice I want it to point at? (i.e. something in web.config or elsewhere?)

2. Should I NOT use "Import Web Service" at all, and write the code by hand? Note: this is VERY time consuming for the number of services that are exposed in larger apps. My typical dev cycle consists of parallel updates/upgrades to web services as they are demanded by elements incorporated in the Flex app.. so it's very convenient to just re-import the WSDL as I make changes.

Thanks so much for your input!

Brian

1 Reply