Thomas Burleson RUX Consultant http://www.gridlinked.info [email_address] Principal Architect www.universalmind.com www.spatialkey.com Flex Behavior Injection A  New  Perspective on Component Development 06/08/09 [email_address] http://www.linkedin.com/in/thomasburleson
Developing Flex applications is fun, challenging, and complex Developing Flex RUX means:  RIA Foundations graphics,  skinning,  sophisticated components, and  user interactions . 06/08/09 [email_address]
Basics of Software Development Extend existing function with  inheritance Extend existing function with  composition Extend using interfaces [not discussed] 06/08/09 [email_address] What  are the traditional approaches to add & manage complexity in RIAs?  Developers can…
Extending with Inheritance Using *.as classes 06/08/09 www.gridlinked.info/blog
Extending with Inheritance 06/08/09 www.gridlinked.info/blog Using *.MXML classes
Extending with Composition Using *.MXML classes 06/08/09 www.gridlinked.info/blog
What are the  Downsides ? Cool functionality is specific to a component or its inheritance chain. Cannot  be easily reused  in new components. To easy to  duplicate  code   with “copy-n-paste” Requires  source code  Is  compile-time  dependent 06/08/09
RUX Solutions Many RIA applications require features for  behaviors  such as: Zoom Swap Resizing Drag-n-Drop  Minimize Iconify Layout Configurations etc. How do we add such functionality during RUNTIME?  How can we do this so the new functionality is reusable with almost ANY component? 06/08/09 www.gridlinked.info/blog
Runtime Behavior Injection Use special components that “ attach ” themselves to target  component(s). Can easily be applied to many [ any ] target;  results are  amazing simplicity and reusability. Intercept and act as a “ proxy ” for the target(s) Inject  listeners  to provide functionality for the target(s) 06/08/09 www.gridlinked.info/blog
Adobe Chart Dashboard Consider the sample Flex application below: 06/08/09 www.gridlinked.info/blog
Adobe Chart Dashboard To add zooming features to for the charts, simply add the  Zoomer  component and set its ‘targets’ and trigger .  No other code changes !  Parenting, constraints, animation,… all handled by the  Zoomer . 06/08/09 www.gridlinked.info/blog
Sample:  Adobe Chart Dashboard To add swap features to for the charts, simply add the  Swapper  component & set its ‘targets’.  No other code changes !  Parenting, constraints, animation,… all handled by the  Swapper . 06/08/09 www.gridlinked.info/blog
Past Projects http://www.linkedin.com/in/thomasburleson Thomas Burleson RUX Consultant http://www.gridlinked.info

Flex Behavior Injection

  • 1.
    Thomas Burleson RUXConsultant http://www.gridlinked.info [email_address] Principal Architect www.universalmind.com www.spatialkey.com Flex Behavior Injection A New Perspective on Component Development 06/08/09 [email_address] http://www.linkedin.com/in/thomasburleson
  • 2.
    Developing Flex applicationsis fun, challenging, and complex Developing Flex RUX means: RIA Foundations graphics, skinning, sophisticated components, and user interactions . 06/08/09 [email_address]
  • 3.
    Basics of SoftwareDevelopment Extend existing function with inheritance Extend existing function with composition Extend using interfaces [not discussed] 06/08/09 [email_address] What are the traditional approaches to add & manage complexity in RIAs? Developers can…
  • 4.
    Extending with InheritanceUsing *.as classes 06/08/09 www.gridlinked.info/blog
  • 5.
    Extending with Inheritance06/08/09 www.gridlinked.info/blog Using *.MXML classes
  • 6.
    Extending with CompositionUsing *.MXML classes 06/08/09 www.gridlinked.info/blog
  • 7.
    What are the Downsides ? Cool functionality is specific to a component or its inheritance chain. Cannot be easily reused in new components. To easy to duplicate code with “copy-n-paste” Requires source code Is compile-time dependent 06/08/09
  • 8.
    RUX Solutions ManyRIA applications require features for behaviors such as: Zoom Swap Resizing Drag-n-Drop Minimize Iconify Layout Configurations etc. How do we add such functionality during RUNTIME? How can we do this so the new functionality is reusable with almost ANY component? 06/08/09 www.gridlinked.info/blog
  • 9.
    Runtime Behavior InjectionUse special components that “ attach ” themselves to target component(s). Can easily be applied to many [ any ] target; results are amazing simplicity and reusability. Intercept and act as a “ proxy ” for the target(s) Inject listeners to provide functionality for the target(s) 06/08/09 www.gridlinked.info/blog
  • 10.
    Adobe Chart DashboardConsider the sample Flex application below: 06/08/09 www.gridlinked.info/blog
  • 11.
    Adobe Chart DashboardTo add zooming features to for the charts, simply add the Zoomer component and set its ‘targets’ and trigger . No other code changes ! Parenting, constraints, animation,… all handled by the Zoomer . 06/08/09 www.gridlinked.info/blog
  • 12.
    Sample: AdobeChart Dashboard To add swap features to for the charts, simply add the Swapper component & set its ‘targets’. No other code changes ! Parenting, constraints, animation,… all handled by the Swapper . 06/08/09 www.gridlinked.info/blog
  • 13.
    Past Projects http://www.linkedin.com/in/thomasburlesonThomas Burleson RUX Consultant http://www.gridlinked.info