flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: UIComponent lifecycle and invalidation in FlexJS
Date Fri, 07 Jun 2013 22:53:01 GMT

On 6/7/13 3:15 PM, "Carlos Rovira" <carlosrovira@apache.org> wrote:

>I ask it some time ago and I think it was not taken into account, but I
>think it's important.
>Right now FlexJS brings lots of new concepts like strands and beads or new
>mxml "on the fly" but I don't see old but good techniques of legacy Flex
>One legacy thing I like was UIComponent lifecycle and it's invalidation
>mechanism. I assume that maybe it's too soon and until now nobody tried to
>implement this.
>But I want to ask since maybe Alex, Peter and others does not want such
>lifecycle for UIComponents.
>I think we should discuss a bit about what we want in this section and if
>we could plan to have something in the line of what we already have in
>or people are considering new approaches.

Good topic as well.  Right now, I want to see how far we can go in FlexJS
without invalidation.  That's because current Flex relies on frame events
to pump validation and there is no such thing as frame events in HTML/JS
and I'd rather not keep hooking up to setTimeout.  But that is not set in
stone either.

In fact, Peter and I were discussing this topic in relation to the Alert
classes he is building as he needed to measure some text.  It turns out
that the measuring phase in current Flex is not always useful and
sometimes wasteful.  Currently Flex measures every component on the
display list from the bottom up, but quite often, layout is driven from
the top by percentages and other constraints and the measurements are not
needed up front.

FlexJS is attempting to do more things "on-demand" so instead of measuring
everything, we're going to see if we can get away with measuring only when
we need to.

Invalidation is good when changing a bunch of properties at once,
especially when properties needed to be applied in a certain order.  The
question is whether that needs to be handled globally like a LayoutManager
or some more internal callLater feature on a per-instance basis.

Like I said, nothing is set in stone, so thoughts on this topic are


View raw message