This content has been marked as final. Show 3 replies
I doubt it's possible to write a useful Flex app with no ActionScript code whatsoever in it. So, you always use the two together.
It's possible to write a Flex app without the MXML stuff, creating everything in ActionScript, but I wouldn't. The MXML stuff makes most things easier.
I would only create a pure ActionScript program if I needed to make something that didn't use Flex, and perhaps needed to work as a SWC for use in a larger Flash project. For instance, maybe I wanted to make some kind of widget for the Flash project that I knew was going to be code-heavy, so doing it in the Flash authoring environment would be a pain. I might pop in to Flex Builder, create the widget, build it as a SWC, then drop it into Flash and continue doing the graphics-heavy stuff that the authoring environment does so much better than Flex Builder.
Flex the API is best used for traditional-style applications. Forms, buttons, menus, databases. You know, applications.
MXML in general is a good choice if you can specific structures using declarative code. As soon, as things get procedural, AS3 is the way to go.
At the other side, if you feel more comfortable with AS3, it's OK to use all over procedural code. The downside: The procedural code tends to be more complex and less readable as pure declarative code.
But, to be honest, all tends to be a matter of personal taste and background.
Create most of your UI in MXML and also most of your components if they are fairly simple. This will save you much time.
Use AS for the functionality of the app, for more complex components, and for components that do not require a UI.