Your SlideShare is downloading. ×
0
Flex Custom Component LifeCycle Practice <ul><li>Cheng-Du, China </li></ul><ul><li>Apr 24, 2009 </li></ul>Jex Chen [email_...
Content <ul><li>Flex Fundamental  (30 mins) </li></ul><ul><li>Application Startup LifeCycle  (15 mins) </li></ul><ul><li>F...
Flex Fundamental <ul><li>RIA </li></ul><ul><li>Flex & Flash </li></ul><ul><li>Development Dev </li></ul><ul><li>MXML & Act...
Event Flow Example
Content <ul><li>Flex Fundamental  (30 mins) </li></ul><ul><li>Application Startup LifeCycle   (15 mins) </li></ul><ul><li>...
Essential of Flash & Flex
Application startup lifecycle
Application startup lifecycle
createChildren() <ul><li>frame 1  </li></ul><ul><li>Create  SystemManager  instance </li></ul><ul><li>SystemManager instru...
Example
Content <ul><li>Flex Fundamental  (30 mins) </li></ul><ul><li>Application Startup LifeCycle  (15 mins) </li></ul><ul><li>F...
LifeCycle of Custom Component <ul><li>BIRTH :   </li></ul><ul><ul><li>construction, configuration, attachment, initializat...
LifeCycle of Custom Component
Initialization Phase
Initilization
Overview
Flash Player Model
createChildren() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex  addChild(customComponent).   <...
comitProperties() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>also be call...
measure() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>It can also be calle...
updateDisplayList() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>It can als...
container's creation life cycle:
Example
Tips and Tricks
Flex Learning Resource
How to learn Flex <ul><ul><li>http://www.adobe.com/devnet/flex/learn/ </li></ul></ul><ul><ul><li>source code of Flex SDK i...
Upcoming SlideShare
Loading in...5
×

Flex Custom Component Lifecycle Practice

3,598

Published on

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,598
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
117
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • Transcript of "Flex Custom Component Lifecycle Practice"

    1. 1. Flex Custom Component LifeCycle Practice <ul><li>Cheng-Du, China </li></ul><ul><li>Apr 24, 2009 </li></ul>Jex Chen [email_address] http://www.jexchen.com
    2. 2. Content <ul><li>Flex Fundamental (30 mins) </li></ul><ul><li>Application Startup LifeCycle (15 mins) </li></ul><ul><li>Flex custom component lifecycle (1 hour) </li></ul><ul><li>Learning resource (10 mins) </li></ul><ul><li>Date/Time component by Young (30 mins) </li></ul><ul><li>Example + Best Practice </li></ul>
    3. 3. Flex Fundamental <ul><li>RIA </li></ul><ul><li>Flex & Flash </li></ul><ul><li>Development Dev </li></ul><ul><li>MXML & ActionScript3.0 (Hello Active  ) </li></ul><ul><li>Event Based Application </li></ul>
    4. 4. Event Flow Example
    5. 5. Content <ul><li>Flex Fundamental (30 mins) </li></ul><ul><li>Application Startup LifeCycle (15 mins) </li></ul><ul><li>Flex custom component lifecycle (1 hour) </li></ul><ul><li>Learning resource (10 mins) </li></ul><ul><li>Date/Time component by Young (25 mins) </li></ul><ul><li>Example + Best Practice </li></ul>
    6. 6. Essential of Flash & Flex
    7. 7. Application startup lifecycle
    8. 8. Application startup lifecycle
    9. 9. createChildren() <ul><li>frame 1 </li></ul><ul><li>Create SystemManager instance </li></ul><ul><li>SystemManager instruct the Flash Player to stop at the end of frame 1. </li></ul><ul><li>Preloader DownloadProgressBar </li></ul><ul><li>System Manager goes on to frame 2 and instantiates the Application instance. </li></ul><ul><li>the SystemManager sets Application.systemManager to itself. </li></ul><ul><li>preinitialize event </li></ul><ul><li>Application goes on to create its children. The method createChildren() is called on the application. </li></ul><ul><li>initialize event which indicates that all application’s components have been initialized. </li></ul><ul><li>child controls and containers have been created, sized and positioned, the Application dispatches the creationComplete event. </li></ul><ul><li>the Preloader removes the DownloadProgressBar control and the SystemManager adds the Application instance to the Flash Player display list . </li></ul><ul><li>applicationComplete </li></ul>
    10. 10. Example
    11. 11. Content <ul><li>Flex Fundamental (30 mins) </li></ul><ul><li>Application Startup LifeCycle (15 mins) </li></ul><ul><li>Flex custom component lifecycle </li></ul><ul><li>Learning resource (10 mins) </li></ul><ul><li>Date/Time component by Young (30 mins) </li></ul><ul><li>Example + Best Practice </li></ul>
    12. 12. LifeCycle of Custom Component <ul><li>BIRTH : </li></ul><ul><ul><li>construction, configuration, attachment, initialization . </li></ul></ul><ul><li>LIFE: </li></ul><ul><ul><li>invalidation, validation, interaction </li></ul></ul><ul><li>DEATH: </li></ul><ul><ul><li>detachment, garbage collection </li></ul></ul>
    13. 13. LifeCycle of Custom Component
    14. 14. Initialization Phase
    15. 15. Initilization
    16. 16. Overview
    17. 17. Flash Player Model
    18. 18. createChildren() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex addChild(customComponent). </li></ul><ul><li>What is its purpose? </li></ul><ul><li>To add other child components that the custom component may be comprised of. </li></ul>
    19. 19. comitProperties() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>also be called during the next render event by the invalidateProperties() method. </li></ul><ul><li>What is its purpose? </li></ul><ul><li>It should be called whenever the component is modified in any way that will affect its display. </li></ul><ul><li>Order? </li></ul><ul><li>gets called before measure(). </li></ul>
    20. 20. measure() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>It can also be called during the next render event by the invalidateSize() method. </li></ul><ul><li>What is its purpose? </li></ul><ul><li>measuredHeight </li></ul><ul><li>measuredWidth </li></ul><ul><li>measuredMinHeight </li></ul><ul><li>measuredMinWidth. </li></ul><ul><li>Order? </li></ul><ul><li>gets called before updateDisplayList(). </li></ul>
    21. 21. updateDisplayList() <ul><li>When is it called? </li></ul><ul><li>automatically called by Flex </li></ul><ul><li>It can also be called during the next render event by the invalidateDisplayList() method. </li></ul><ul><li>What is its purpose? </li></ul><ul><li>Set the size and position of the custom component’s children </li></ul><ul><li>Draws any visual elements . </li></ul><ul><li>Order? </li></ul><ul><li>last method to be called in the component lifecycle. </li></ul>
    22. 22. container's creation life cycle:
    23. 23. Example
    24. 24. Tips and Tricks
    25. 25. Flex Learning Resource
    26. 26. How to learn Flex <ul><ul><li>http://www.adobe.com/devnet/flex/learn/ </li></ul></ul><ul><ul><li>source code of Flex SDK is great material for learning </li></ul></ul><ul><ul><li>Learning from lots of open-source components </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×