Best practices are very subjective in software development. If you find one person who says βX,β I can find another who says βY,β and most likely they will both be right in the circumstances.
Most books that I know focus on getting beginners up to speed, as opposed to best practices.
To answer your specific questions:
Should the app always start with Main MXML? Can't I create the first view from the ActionScript class?
In theory, it seems like it should be possible for the main application file to be an ActionSCript; because the Flex compiler simply turns MXM into an ActionSCript. In practice, I have never seen anyone do this. I have seen applications that are ACtionSCript, with the exception of the application tag in the main application file.
How would you add an MXML handler first and give flow control to it?
What do you mean by handler and thread control? I am not sure if I have a specific answer. Many people use frameworks. Cairngorm is the most widely used, but some find it overly complex. For a while, Mat was a favorite of the community. RobotLegs is the current favorite.
I am trying to write null code on my MXML files to preserve decoupling from the code. Is this possible in Flex?
It depends. Isn't that also a code? If you want to use the "Model View Controller" Style, there are many ways. A framework can help, and I mentioned a bit above. But, you could also do it yourself. If you are new to Flex, I would recommend that you start developing βNo Frameβ and bring the framework into the equation to find out if they help solve the problems you are facing.
Jeffryhouser
source share