Flex Custom Component Lifecycle Practice

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Flex Custom Component Lifecycle Practice - Presentation Transcript

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

    + jexchanjexchan Nominate

    custom

    913 views, 2 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 913
      • 912 on SlideShare
      • 1 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 15
    Most viewed embeds
    • 1 views on http://www.jexchen.com

    more

    All embeds
    • 1 views on http://www.jexchen.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?