Given two "almost identical" (more on that below) container classes one
implemented in MXML, the other in ActionScript, which one is likely to be more
performant?
I'm not a Flex expert, but I know that even if MXML "is" ActionScript, there a
number of things that are quite different. For instance, the layout of
components is entirely taken care by MXML while in AS3 we have to do it by
hand. Also binding is much more natural and common in MXML (stuff like
property="{object.value}") while typically (at least in my code) I have no
Bindings in my AS3 classes.
Another difference is that if some of the contained objects are affected by
runtime conditions, since MXML hides away how the layout is actually performed,
I end up doing adjustments on Creation Complete event, which will cause new
re-render events. If I had implemented the class directly in AS3 I could have
done everything inside createChildren() and maybe it would have been more
performant?
What's your experience / best practices toward MXML / AS3 containers and
conditional layout?