Flex Component Lifecycle

4 views
Skip to first unread message

Tyler Wright

unread,
Sep 16, 2009, 11:23:49 AM9/16/09
to reflex-steer...@googlegroups.com
a. We should probably use the same component life cycle as Flex components (createChildren, commitProperties, measure, updateDisplayList)
b. It would be nice if we didn't have to have the same min, max, explicit, measured width/height properties as Flex. Possibly a bad idea though since I'm not sure what issues that would cause.
3. Agreed. For the most part I don't have any problem with Flex's Measurement and Invalidation model. We'll want to define interfaces for these properties so they're optional in Reflex, but I think it'll largely be the same so far.

Yeah, I think it would be smart to use what already works well from Flex (no reason to reinvent the wheel and makes the learning curve not so steep). I already have a lighter weight version of the LayoutManager for invalidation.


My initial thoughts are that the Flex component lifecycle and validation process are one of the shortcommings in Flex.

The Flex instantiation process is overly complicated, something left over from Flex 1.5 and its performance and display-list limitations. I'd like to explore a newer model.

Your implementation of the LayoutManager would be better than Flex's I'm sure, I'd love to have a look and make suggestions. It might be a good idea to hash it out on a Skype call sometime (this weekend?) where we can discuss what's important in a validation cycle and really slim down code and increase performance.

thoughts?

Tyler


Ben Clinkinbeard

unread,
Sep 16, 2009, 11:12:38 PM9/16/09
to reflex-steer...@googlegroups.com
I have seen Ryan's LayoutManager and it looked like a great balance of simplicity and thoroughness. I have actually been working on a plain AS3 project lately and am doing all of my component setup in addedToStage handlers. At that point in time the stage (obviously), child views/components defined in Flash authoring and anything else I have needed are available. Using that event as the trigger for a createChildren() equivalent and then letting Ryan's LayoutManager take it from there seems like it could be a viable solution.

Ben C.

Tyler Wright

unread,
Sep 17, 2009, 12:24:50 PM9/17/09
to reflex-steer...@googlegroups.com
You're right, the addedToStage is a natural place to set up. It's a built in mechanism that allows the parent to set properties on the child before the child is added. I have no problem with using an existing LayoutManager, but if it was modeled after Flex then I don't think it could hurt to review and qualify, make sure it's exactly what we need. And that will depend on how we approach layout in general. I think it's worth a skype call to draw from each or our experiences.

Tyler
Reply all
Reply to author
Forward
0 new messages