SlideShare a Scribd company logo
Component Development in the Flex 4 ModelMichael LabriolaDigital PrimatesTwitter: mlabriola
Who are you?Michael LabriolaSenior Consultant at Digital PrimatesFlex GeekTeam MentorProject Lead for FlexUnit 4
What is this session about?Component DevelopmentComponents are the root of everything in Flex. Know how to make them work and know Flex
What are we doing?Implement and create a layout classImplement and create a skinCreate a custom component using the Flex 4 component framework
What are Flex Components?
Why do you care?Flex is a component frameworkEverything is a component in FlexUnderstand components and understand FlexWhen you want something new, that does something different, you want to create a component
Important things to understandIn Flex 4 components are composed of two piecesThe formThe function
The FunctionWhat the component doesHow it does itWhen it does itDefines what the component isButtons are about being clickedList is about selection and virtualization
The FormA list doesn’t have to be horizontal or vertical to be a listButtons don’t need to be rectanglesWhat makes a list a list? What makes a button a button?
SeparationSeparating these pieces favors composition over inheritanceBy separating form and function we gain and we lose.
We GainThe capability of having one set of functionality look many different waysBack to the list example, a list can be horizontal, vertical, circular, etc. but we only have to maintain the code in one list class
We LoseWe lose a lot of dead weightWe lose a lot of extra classesExample of layout objects embedded in a class
There are two types of UI Components in FlexControlsInteract with a userPresent dataAccept gesturesContainersHold other containers and controlsControl positioning of children
On the topic of losing weightThere are two types of things in the Flex world, those that can be skinned and those that cannotRoughly corresponding to those that have their own visual appearance and those that simply influence the visualization of othersWhy? Because we don’t want to burden everything in the world with functionality it doesn’t need
Groups are the Base Type of ContainerGroups don’t have a visual identity of their ownGroups can accept a layout object to handle the layout of children
Layout TypesLayout types built into flexBasicLayoutHorizontalLayoutVerticalLayoutThe important part about this is creating your own layouts	Circle Layout		Advanced Circle Layout
Create a Circle Layout
Controls and Some Containers can be SkinnedControls can also have their visual appearance modified and quite easily by skinning
SkinsSkins are classes defined in MXMLThey are based on the Skin classThey are applied to components using		The skinClass		Or by CSS
DefinitionsThink about the list classNo visual elements can exist inside the list or it reduces skin-abilityAll visuals exist in the skinThat means the component provides the functionality and controls aspects of the skinThat could get ugly
ContractsThat means we must have some sort of contract between a skin and a component.This contract defines the minimum things that must be present inside of the skin to be considered validThis contract is fulfilled in two ways
ComponentsDeclare skin parts (required or not)Declare skin statesHELP!
SkinsSpecify a HostComponent<fx:Metadata>  [HostComponent("spark.components.Button")]</fx:Metadata>Declare states<s:states>  <s:State name="up" />  <s:State name="over" /></s:states>Establish visuals
VisualsWhat type of visuals?
CODE
Q & ASeriously? You must have some questions by now?
Play and VoteTake a look at the latest beta bits:http://labs.adobe.com/technologies/flashbuilder4/
ResourcesLabriola’sBloghttp://blogs.digitalprimates.net/codeSlinger/Tapper’s Bloghttp://blogs.digitalprimates.net/jefftapper/Follow us on twittermlabriola and jefftapper

More Related Content

Similar to Flex 4 Component Development (20)

PPT
Flex 4 Deep Dive
Effective
 
PPT
Flex 4 Deep Dive
EffectiveUI
 
PPT
2007 Max Presentation - Creating Custom Flex Components
michael.labriola
 
KEY
Rage Against the Framework
David Ortinau
 
PPTX
Adobe Flex Don't Style It, Skin it!
DevelopmentArc LLC
 
KEY
Migrating fx3tofx4
Jonathan Campos
 
PPT
Building Cool apps with flex
Joseph Khan
 
PPT
Adobe Flex Introduction
Amal Biswas
 
PPT
Introduction to flex
Parambir Singh
 
PPTX
Basics of Flex Components, Skinning
Yukti Kaura
 
PPT
Flex 4 Overview
RJ Owen
 
POTX
Flex Mobile Skinning Workshop
Terry Ryan
 
PDF
Max 2010: Having Fun Flex4 Layouts
Xavi Beumala
 
PPTX
Flex 4
imatrof
 
PDF
Flex4 Component Lifecycle
EffectiveUI
 
PDF
Flex4 Component Lifecycle
Effective
 
PPTX
Exploring Adobe Flex
senthil0809
 
PDF
Flex4 component lifecycle
RJ Owen
 
PPT
Test
guest25229c
 
PPT
How To Navigate And Extend The Flex Infrastructure
michael.labriola
 
Flex 4 Deep Dive
Effective
 
Flex 4 Deep Dive
EffectiveUI
 
2007 Max Presentation - Creating Custom Flex Components
michael.labriola
 
Rage Against the Framework
David Ortinau
 
Adobe Flex Don't Style It, Skin it!
DevelopmentArc LLC
 
Migrating fx3tofx4
Jonathan Campos
 
Building Cool apps with flex
Joseph Khan
 
Adobe Flex Introduction
Amal Biswas
 
Introduction to flex
Parambir Singh
 
Basics of Flex Components, Skinning
Yukti Kaura
 
Flex 4 Overview
RJ Owen
 
Flex Mobile Skinning Workshop
Terry Ryan
 
Max 2010: Having Fun Flex4 Layouts
Xavi Beumala
 
Flex 4
imatrof
 
Flex4 Component Lifecycle
EffectiveUI
 
Flex4 Component Lifecycle
Effective
 
Exploring Adobe Flex
senthil0809
 
Flex4 component lifecycle
RJ Owen
 
How To Navigate And Extend The Flex Infrastructure
michael.labriola
 

More from michael.labriola (17)

PPTX
Optimizing Browser Rendering
michael.labriola
 
PPT
Randori design goals and justification
michael.labriola
 
PPTX
L2624 labriola
michael.labriola
 
PPT
Talking trash
michael.labriola
 
PPTX
Flex 4 components from the firehose
michael.labriola
 
PPT
Developing for a world wide audience
michael.labriola
 
PPT
Developing for a world wide audience
michael.labriola
 
PPT
FlexUnit 4 for contributors
michael.labriola
 
PPT
Write once... Take Less Time to Deploy
michael.labriola
 
PPT
Why test with flex unit
michael.labriola
 
PPTX
Any Which Array But Loose
michael.labriola
 
PPTX
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
PPT
Air Drag And Drop
michael.labriola
 
PPT
Diving in the Flex Data Binding Waters
michael.labriola
 
PDF
Blaze Ds Slides
michael.labriola
 
PPT
Dense And Hot 360 Flex
michael.labriola
 
PPT
Dense And Hot Web Du
michael.labriola
 
Optimizing Browser Rendering
michael.labriola
 
Randori design goals and justification
michael.labriola
 
L2624 labriola
michael.labriola
 
Talking trash
michael.labriola
 
Flex 4 components from the firehose
michael.labriola
 
Developing for a world wide audience
michael.labriola
 
Developing for a world wide audience
michael.labriola
 
FlexUnit 4 for contributors
michael.labriola
 
Write once... Take Less Time to Deploy
michael.labriola
 
Why test with flex unit
michael.labriola
 
Any Which Array But Loose
michael.labriola
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
Air Drag And Drop
michael.labriola
 
Diving in the Flex Data Binding Waters
michael.labriola
 
Blaze Ds Slides
michael.labriola
 
Dense And Hot 360 Flex
michael.labriola
 
Dense And Hot Web Du
michael.labriola
 
Ad

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Ad

Flex 4 Component Development

  • 1. Component Development in the Flex 4 ModelMichael LabriolaDigital PrimatesTwitter: mlabriola
  • 2. Who are you?Michael LabriolaSenior Consultant at Digital PrimatesFlex GeekTeam MentorProject Lead for FlexUnit 4
  • 3. What is this session about?Component DevelopmentComponents are the root of everything in Flex. Know how to make them work and know Flex
  • 4. What are we doing?Implement and create a layout classImplement and create a skinCreate a custom component using the Flex 4 component framework
  • 5. What are Flex Components?
  • 6. Why do you care?Flex is a component frameworkEverything is a component in FlexUnderstand components and understand FlexWhen you want something new, that does something different, you want to create a component
  • 7. Important things to understandIn Flex 4 components are composed of two piecesThe formThe function
  • 8. The FunctionWhat the component doesHow it does itWhen it does itDefines what the component isButtons are about being clickedList is about selection and virtualization
  • 9. The FormA list doesn’t have to be horizontal or vertical to be a listButtons don’t need to be rectanglesWhat makes a list a list? What makes a button a button?
  • 10. SeparationSeparating these pieces favors composition over inheritanceBy separating form and function we gain and we lose.
  • 11. We GainThe capability of having one set of functionality look many different waysBack to the list example, a list can be horizontal, vertical, circular, etc. but we only have to maintain the code in one list class
  • 12. We LoseWe lose a lot of dead weightWe lose a lot of extra classesExample of layout objects embedded in a class
  • 13. There are two types of UI Components in FlexControlsInteract with a userPresent dataAccept gesturesContainersHold other containers and controlsControl positioning of children
  • 14. On the topic of losing weightThere are two types of things in the Flex world, those that can be skinned and those that cannotRoughly corresponding to those that have their own visual appearance and those that simply influence the visualization of othersWhy? Because we don’t want to burden everything in the world with functionality it doesn’t need
  • 15. Groups are the Base Type of ContainerGroups don’t have a visual identity of their ownGroups can accept a layout object to handle the layout of children
  • 16. Layout TypesLayout types built into flexBasicLayoutHorizontalLayoutVerticalLayoutThe important part about this is creating your own layouts Circle Layout Advanced Circle Layout
  • 18. Controls and Some Containers can be SkinnedControls can also have their visual appearance modified and quite easily by skinning
  • 19. SkinsSkins are classes defined in MXMLThey are based on the Skin classThey are applied to components using The skinClass Or by CSS
  • 20. DefinitionsThink about the list classNo visual elements can exist inside the list or it reduces skin-abilityAll visuals exist in the skinThat means the component provides the functionality and controls aspects of the skinThat could get ugly
  • 21. ContractsThat means we must have some sort of contract between a skin and a component.This contract defines the minimum things that must be present inside of the skin to be considered validThis contract is fulfilled in two ways
  • 22. ComponentsDeclare skin parts (required or not)Declare skin statesHELP!
  • 23. SkinsSpecify a HostComponent<fx:Metadata> [HostComponent("spark.components.Button")]</fx:Metadata>Declare states<s:states> <s:State name="up" /> <s:State name="over" /></s:states>Establish visuals
  • 25. CODE
  • 26. Q & ASeriously? You must have some questions by now?
  • 27. Play and VoteTake a look at the latest beta bits:http://labs.adobe.com/technologies/flashbuilder4/