As the name itself suggests, it is important for you to understand and define the Ecosystem that your Flex application should follow and work on. If you are working on a project that you want to continue to breathe and make sure that it does not falls short of any needs, it is your duty to setup the needed infrastructure that is supported by its own. In this article, I will recommend to you how to setup a Ecosystem for a Flex application.
For any Flex Application there following aspects are very crucial:
1. A Flex Application project
2. Build script
3. Debugging and profiling tools
4. Unit testing framework
A Flex Application Project
You may have a need to integrate your flex application into an existing application (J2EE or .NET) or you may be starting a fresh with-out a back-end. No matter how you choose to start, always make sure that you have a project setup independently as a Flex Application project. By doing so, you are setting up something that can exist on its own and that has big benefits. A few:
- You can then integrate the application to a back-end of your choice and not needing to change anything on the client like JBoss, TomCat, IIS;
- Setting up debuggers and profilers for the application again becomes an easy one;
- If you have Java heavy back-ends, then again that makes it easier to keep the back-end and front-end code cleanly separated
Using Flex builder’s Build and deployment is a nice to have option, but in an enterprise development environment, it becomes difficult to use the Flex Builder’s GUI to do such things. You are better off to use a build script to handle any builds. One big advantage is when you get on to non-human interfaces the framework is scalable. You have two options: Using Ant and Maven
Debugging and Profiling tools
There are some easy and not so easy ways to do so, but if you are using Flex Builder that should be more than suffice. Two other techniques are to use “trace” and “System.totalMemory()” that can be used effectively to understand how is the application progressing
Unit Testing Framework
FlexUnit is an effective way of doing unit testing in the code. It took me just over an hour to understand the framework an get started. If you want to understand why do you test then read this article.
Overall if you get these right, I am pretty sure that you will have an easy task of managing a scalable application.