SlideShare a Scribd company logo
1 of 28
Component Development in the Flex 4 Model Michael Labriola Digital Primates Twitter: mlabriola
Who are you? Michael Labriola Senior Consultant at Digital Primates Flex Geek Team Mentor Project Lead for FlexUnit 4
What is this session about? Component Development Components 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 class Implement and create a skin Create a custom component using the Flex 4 component framework
What are Flex Components?
Why do you care? Flex is a component framework Everything is a component in Flex Understand components and understand Flex When you want something new, that does something different, you want to create a component
Important things to understand In Flex 4 components are composed of two pieces The form The function
The Function What the component does How it does it When it does it Defines what the component is Buttons are about being clicked List is about selection and virtualization
The Form A list doesn’t have to be horizontal or vertical to be a list Buttons don’t need to be rectangles What makes a list a list? What makes a button a button?
Separation Separating these pieces favors composition over inheritance By separating form and function we gain and we lose.
We Gain The capability of having one set of functionality look many different ways Back 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 Lose We lose a lot of dead weight We lose a lot of extra classes Example of layout objects embedded in a class
There are two types of UI Components in Flex Controls Interact with a user Present data Accept gestures Containers Hold other containers and controls Control positioning of children
On the topic of losing weight There are two types of things in the Flex world, those that can be skinned and those that cannot Roughly corresponding to those that have their own visual appearance and those that simply influence the visualization of others Why? Because we don’t want to burden everything in the world with functionality it doesn’t need
Groups are the Base Type of Container Groups don’t have a visual identity of their own Groups can accept a layout object to handle the layout of children
Layout Types Layout types built into flex BasicLayout HorizontalLayout VerticalLayout The important part about this is creating your own layouts 	Circle Layout 		Advanced Circle Layout
Create a Circle Layout
Controls and Some Containers can be Skinned Controls can also have their visual appearance modified and quite easily by skinning
Skins Skins are classes defined in MXML They are based on the Skin class They are applied to components using 		The skinClass 		Or by CSS
Definitions Think about the list class No visual elements can exist inside the list or it reduces skin-ability All visuals exist in the skin That means the component provides the functionality and controls aspects of the skin That could get ugly
Contracts That 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 valid This contract is fulfilled in two ways
Components Declare skin parts (required or not) Declare skin states HELP!
Skins Specify 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
Visuals What type of visuals?
CODE
Q & A Seriously? You must have some questions by now?
Play and Vote Take a look at the latest beta bits: http://labs.adobe.com/technologies/flashbuilder4/
Resources Labriola’sBlog http://blogs.digitalprimates.net/codeSlinger/ Tapper’s Blog http://blogs.digitalprimates.net/jefftapper/ Follow us on twitter mlabriola and jefftapper

More Related Content

Similar to Flex 4 Component Development

W6 7 organizational design-structure
W6 7 organizational design-structureW6 7 organizational design-structure
W6 7 organizational design-structure
novas agita
 
How To Navigate And Extend The Flex Infrastructure
How To Navigate And Extend The Flex InfrastructureHow To Navigate And Extend The Flex Infrastructure
How To Navigate And Extend The Flex Infrastructure
michael.labriola
 
Organizational Structure
Organizational StructureOrganizational Structure
Organizational Structure
ahmad bassiouny
 

Similar to Flex 4 Component Development (20)

EvolveIcons.pdf
EvolveIcons.pdfEvolveIcons.pdf
EvolveIcons.pdf
 
Elements_Users_and_Groups.pdf
Elements_Users_and_Groups.pdfElements_Users_and_Groups.pdf
Elements_Users_and_Groups.pdf
 
Visual basic
Visual basicVisual basic
Visual basic
 
W6 7 organizational design-structure
W6 7 organizational design-structureW6 7 organizational design-structure
W6 7 organizational design-structure
 
SAFe 5 Handbook - Outline.docx
SAFe 5 Handbook - Outline.docxSAFe 5 Handbook - Outline.docx
SAFe 5 Handbook - Outline.docx
 
M365 Toronto User Group June 2021.pptx
M365 Toronto User Group June 2021.pptxM365 Toronto User Group June 2021.pptx
M365 Toronto User Group June 2021.pptx
 
Microsoft 365 Toronto User Group June 2021
Microsoft 365 Toronto User Group June 2021Microsoft 365 Toronto User Group June 2021
Microsoft 365 Toronto User Group June 2021
 
Flex Web Development.pdf
Flex Web Development.pdfFlex Web Development.pdf
Flex Web Development.pdf
 
Scripted navigation ideas for Oracle Service Cloud
Scripted navigation ideas for Oracle Service CloudScripted navigation ideas for Oracle Service Cloud
Scripted navigation ideas for Oracle Service Cloud
 
How To Navigate And Extend The Flex Infrastructure
How To Navigate And Extend The Flex InfrastructureHow To Navigate And Extend The Flex Infrastructure
How To Navigate And Extend The Flex Infrastructure
 
Flex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex CampFlex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex Camp
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design Patterns
 
Principles of Interactive Design
Principles of Interactive DesignPrinciples of Interactive Design
Principles of Interactive Design
 
Employee Community
Employee CommunityEmployee Community
Employee Community
 
Organizational Structure
Organizational StructureOrganizational Structure
Organizational Structure
 
2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx
 
MGT380 Week 5 Instructor Guidance
MGT380 Week 5 Instructor GuidanceMGT380 Week 5 Instructor Guidance
MGT380 Week 5 Instructor Guidance
 
Software System Engineering - Chapter 11
Software System Engineering - Chapter 11Software System Engineering - Chapter 11
Software System Engineering - Chapter 11
 
Creating Custom Spark Components in Flex 4
Creating Custom Spark Components in Flex 4Creating Custom Spark Components in Flex 4
Creating Custom Spark Components in Flex 4
 
Ooa 1 Post
Ooa 1 PostOoa 1 Post
Ooa 1 Post
 

More from michael.labriola

Developing for a world wide audience
Developing for a world wide audienceDeveloping for a world wide audience
Developing for a world wide audience
michael.labriola
 

More from michael.labriola (17)

Optimizing Browser Rendering
Optimizing Browser RenderingOptimizing Browser Rendering
Optimizing Browser Rendering
 
Randori design goals and justification
Randori design goals and justificationRandori design goals and justification
Randori design goals and justification
 
L2624 labriola
L2624 labriolaL2624 labriola
L2624 labriola
 
Talking trash
Talking trashTalking trash
Talking trash
 
Flex 4 components from the firehose
Flex 4 components from the firehoseFlex 4 components from the firehose
Flex 4 components from the firehose
 
Developing for a world wide audience
Developing for a world wide audienceDeveloping for a world wide audience
Developing for a world wide audience
 
Developing for a world wide audience
Developing for a world wide audienceDeveloping for a world wide audience
Developing for a world wide audience
 
FlexUnit 4 for contributors
FlexUnit 4 for contributorsFlexUnit 4 for contributors
FlexUnit 4 for contributors
 
Write once... Take Less Time to Deploy
Write once... Take Less Time to Deploy Write once... Take Less Time to Deploy
Write once... Take Less Time to Deploy
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
Any Which Array But Loose
Any Which Array But LooseAny Which Array But Loose
Any Which Array But Loose
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Air Drag And Drop
Air Drag And DropAir Drag And Drop
Air Drag And Drop
 
Diving in the Flex Data Binding Waters
Diving in the Flex Data Binding WatersDiving in the Flex Data Binding Waters
Diving in the Flex Data Binding Waters
 
Blaze Ds Slides
Blaze Ds SlidesBlaze Ds Slides
Blaze Ds Slides
 
Dense And Hot 360 Flex
Dense And Hot 360 FlexDense And Hot 360 Flex
Dense And Hot 360 Flex
 
Dense And Hot Web Du
Dense And Hot  Web DuDense And Hot  Web Du
Dense And Hot Web Du
 

Recently uploaded

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Flex 4 Component Development

  • 1. Component Development in the Flex 4 Model Michael Labriola Digital Primates Twitter: mlabriola
  • 2. Who are you? Michael Labriola Senior Consultant at Digital Primates Flex Geek Team Mentor Project Lead for FlexUnit 4
  • 3. What is this session about? Component Development Components 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 class Implement and create a skin Create a custom component using the Flex 4 component framework
  • 5. What are Flex Components?
  • 6. Why do you care? Flex is a component framework Everything is a component in Flex Understand components and understand Flex When you want something new, that does something different, you want to create a component
  • 7. Important things to understand In Flex 4 components are composed of two pieces The form The function
  • 8. The Function What the component does How it does it When it does it Defines what the component is Buttons are about being clicked List is about selection and virtualization
  • 9. The Form A list doesn’t have to be horizontal or vertical to be a list Buttons don’t need to be rectangles What makes a list a list? What makes a button a button?
  • 10. Separation Separating these pieces favors composition over inheritance By separating form and function we gain and we lose.
  • 11. We Gain The capability of having one set of functionality look many different ways Back 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 Lose We lose a lot of dead weight We lose a lot of extra classes Example of layout objects embedded in a class
  • 13. There are two types of UI Components in Flex Controls Interact with a user Present data Accept gestures Containers Hold other containers and controls Control positioning of children
  • 14. On the topic of losing weight There are two types of things in the Flex world, those that can be skinned and those that cannot Roughly corresponding to those that have their own visual appearance and those that simply influence the visualization of others Why? Because we don’t want to burden everything in the world with functionality it doesn’t need
  • 15. Groups are the Base Type of Container Groups don’t have a visual identity of their own Groups can accept a layout object to handle the layout of children
  • 16. Layout Types Layout types built into flex BasicLayout HorizontalLayout VerticalLayout The important part about this is creating your own layouts Circle Layout Advanced Circle Layout
  • 17. Create a Circle Layout
  • 18. Controls and Some Containers can be Skinned Controls can also have their visual appearance modified and quite easily by skinning
  • 19. Skins Skins are classes defined in MXML They are based on the Skin class They are applied to components using The skinClass Or by CSS
  • 20. Definitions Think about the list class No visual elements can exist inside the list or it reduces skin-ability All visuals exist in the skin That means the component provides the functionality and controls aspects of the skin That could get ugly
  • 21. Contracts That 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 valid This contract is fulfilled in two ways
  • 22. Components Declare skin parts (required or not) Declare skin states HELP!
  • 23. Skins Specify 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
  • 24. Visuals What type of visuals?
  • 25. CODE
  • 26. Q & A Seriously? You must have some questions by now?
  • 27. Play and Vote Take a look at the latest beta bits: http://labs.adobe.com/technologies/flashbuilder4/
  • 28. Resources Labriola’sBlog http://blogs.digitalprimates.net/codeSlinger/ Tapper’s Blog http://blogs.digitalprimates.net/jefftapper/ Follow us on twitter mlabriola and jefftapper