SlideShare a Scribd company logo
A Brief Intro to Adobe Flex
Intro to Adobe Flex

A brief introduction to Adobe’s RIA development tool.
What is Flex?
What is Flex?	

• Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).
What is Flex?	

• Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).


• A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air.
What is Flex?	

• Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).


• A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air.


• Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs
What is Flex?	

• Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).


• A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air.


• Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs


• A competitor or compliment to AJAX, JavaFX, Silverlight (depends who you ask and in what context)
What is Flex?	

• Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).


• A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air.


• Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs


• A competitor or compliment to AJAX, JavaFX, Silverlight (depends who you ask and in what context)


• Very cool
What isn’t Flex?
What isn’t Flex?

• It’s not a timeline based animation tool
What isn’t Flex?

• It’s not a timeline based animation tool


• It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse
What isn’t Flex?

• It’s not a timeline based animation tool


• It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse


• It’s not a server-side language
What isn’t Flex?

• It’s not a timeline based animation tool


• It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse


• It’s not a server-side language


• It’s not an answer for everything
Origins of Flex
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP


• Built in Eclipse, compiled on the server
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP


• Built in Eclipse, compiled on the server


• It was expensive
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP


• Built in Eclipse, compiled on the server


• It was expensive


• Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has
  just launched with 4 not too far behind.
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP


• Built in Eclipse, compiled on the server


• It was expensive


• Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has
  just launched with 4 not too far behind.


• Opensourced in 2007. SDK/Compiler can be downloaded and snapped into Eclipse for free.
Origins of Flex

• Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like
  ColdFusion or PHP


• Built in Eclipse, compiled on the server


• It was expensive


• Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has
  just launched with 4 not too far behind.


• Opensourced in 2007. SDK/Compiler can be downloaded and snapped into Eclipse for free.


• Education version is also free
Current State of Flex
Current State of Flex

• Growing quickly:


   • Developers are embracing MXML and AS3.


   • The player has nearly a 95% penetration rate.


   • Dependable and Fast: Flex content looks like Flex content on every browser.


   • Easy to debug - Compile time errors, profiler, refactoring support
Current State of Flex

• Growing quickly:


   • Developers are embracing MXML and AS3.


   • The player has nearly a 95% penetration rate.


   • Dependable and Fast: Flex content looks like Flex content on every browser.


   • Easy to debug - Compile time errors, profiler, refactoring support


• Flex blogs, books, tutorials and conferences are exploding
Current State of Flex

• Growing quickly:


   • Developers are embracing MXML and AS3.


   • The player has nearly a 95% penetration rate.


   • Dependable and Fast: Flex content looks like Flex content on every browser.


   • Easy to debug - Compile time errors, profiler, refactoring support


• Flex blogs, books, tutorials and conferences are exploding


• Flex related job listings are also exploding
Basics of Flex
Basics of Flex	

• Runs in the Flash Player or AIR
Basics of Flex	

• Runs in the Flash Player or AIR


• Tag based markup MXML serves as the basis for Flex projects
Basics of Flex	

• Runs in the Flash Player or AIR


• Tag based markup MXML serves as the basis for Flex projects


• MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag>
Basics of Flex	

• Runs in the Flash Player or AIR


• Tag based markup MXML serves as the basis for Flex projects


• MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag>


• Component based development: Containers/Layout Components, UI Elements, Data Connectors, more
Basics of Flex	

• Runs in the Flash Player or AIR


• Tag based markup MXML serves as the basis for Flex projects


• MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag>


• Component based development: Containers/Layout Components, UI Elements, Data Connectors, more


• Actionscript 3 can be used to add behaviors or other interactivity not covered by MXML
Basics of Flex	

• Runs in the Flash Player or AIR


• Tag based markup MXML serves as the basis for Flex projects


• MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag>


• Component based development: Containers/Layout Components, UI Elements, Data Connectors, more


• Actionscript 3 can be used to add behaviors or other interactivity not covered by MXML


• Supports common OOP practices like MVC patterns, code behind, etc.
Basic of Flex Continued
Basic of Flex Continued

• MXML components can be brought onto the canvas via the GUI similar to Dreamweaver or VisualStudio


• Markup can be written by hand with code assist, too. Again, similar to Dreamweaver or VisualStudio


• MXML components have attributes that allow for modification of appearance or behavior


• Components can be extended for additional capabilities or reuse via MXML or AS or a combo of both.


• Containers control layout (Canvas, Vertical Box, Horizontal Box)


• UI components display data, control interactivity or display states or other visual feedback (Datagrids, lists, buttons, selects menus,
  radio buttons, etc.)


• Data components load or send data (Services, XML, Remoting, etc)


• Other tags include: Script, Style, etc.


• Tags can be nested similar to HTML/XML
Designing Interfaces in Flex
Designing Interfaces in Flex

• CSS can be used to style the components


• Flash, PNGs, and JPGs can be used to skin the components, too


• Illustrator, Photoshop, Fireworks, Flash all have component design sets to assist in UI skinning


• Constraint based layouts and percentage based placements make polished, uniform layouts much easier
My First Flex App: Hello World
My First Flex App: Hello World

  <?xml version="1.0" encoding="utf-8"?>
My First Flex App: Hello World

   <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
My First Flex App: Hello World

   <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	 <mx:Label x="10" y="10" text="Output" id="output"/>
My First Flex App: Hello World

   <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	 <mx:Label x="10" y="10" text="Output" id="output"/>
	 <mx:Button x="10" y="36" label="Click Me" click="{output.text = 'Hello World'}"/>
My First Flex App: Hello World

   <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	 <mx:Label x="10" y="10" text="Output" id="output"/>
	 <mx:Button x="10" y="36" label="Click Me" click="{output.text = 'Hello World'}"/>
</mx:Application>
My First Okay Flex App: Hello World from XML
My First Okay Flex App: Hello World from XML

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	   <mx:Script>
	   	    <![CDATA[
	   	    	    //my favorite little random function - seed with floor and ceiling and it brings back a random integer from the range
             public function randRange(min:Number, max:Number):Number {
             var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
                 return randomNum;
             }
	   	    ]]>
	   </mx:Script>
    <mx:XML id="myXML" xmlns="">
    	
    <greetings>
    	
    	    <greeting>Hola Mundo</greeting>
    	
    	    <greeting>Hello World</greeting>
    	
    	    <greeting>Ciao Mondo</greeting>
    	
    	    <greeting>Hallo welt</greeting>
    	
    	    <greeting>            </greeting>
    	
    </greetings>
    </mx:XML>
	   <mx:Label x="10" y="10" text="Output" id="output"/>
	   <mx:Button x="10" y="36" label="Click Me" click="{output.text = myXML.greeting[randRange(0, 4)].valueOf()}"/>
</mx:Application>
My First More Okay Flex App: Hello World from External XML
My First More Okay Flex App: Hello World from External XML

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	   <mx:Script>
	   	    <![CDATA[
	   	    	    //my favorite little random function - seed with floor and ceiling and it brings back a random integer from the range
             public function randRange(min:Number, max:Number):Number {
             var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
                 return randomNum;
             }
	   	    ]]>
	   </mx:Script>
    <mx:XML id="myXML" source="externalXML.xml" xmlns="" />
	   <mx:Label x="10" y="10" text="Output" id="output"/>
	   <mx:Button x="10" y="36" label="Click Me" click="{output.text = myXML.greeting[randRange(0, 4)].valueOf()}"/>
</mx:Application>
More Flex Info

• adobe.com/flex


• flex.org


• weblogs.macromedia.com/mxna


• opensource.adobe.com


• visualrinse.com


• 30onair.com
Enough yakking, let’s code

• Cross your fingers


• Stick around to heckle and get some freebies

More Related Content

ODP
Better Drupal Interaction Design with Flex
PPT
Adobe flex an overview
PPT
Flex 4 Overview
PPT
Flex & Drupal Integration
PPT
Apache Flex: Overview
PDF
Cloud Apache OpenOffice based on HTML5
PPTX
WebAssembly and .NET
PPT
VFP & Ajax
Better Drupal Interaction Design with Flex
Adobe flex an overview
Flex 4 Overview
Flex & Drupal Integration
Apache Flex: Overview
Cloud Apache OpenOffice based on HTML5
WebAssembly and .NET
VFP & Ajax

What's hot (18)

PPT
Ria Development With Flex And PHP
KEY
Flash platform introduction
PDF
Building Desktop RIAs with PHP, HTML & Javascript in AIR
PPT
Getting Started with Flex and PHP
ODP
My view on XPages
PPT
MikeTaulty_Ux_Update
PPTX
Introduction to Microsoft Silverlight
PPTX
Evolution of Applications & Web
PDF
Tech Stack Ideas
PDF
Past, present, and future of web assembly - Devfest Nantes 2017
PPT
Architecting RIAs
PPT
Concepts of Asp.Net
PPT
introduction to Lamp Stack
PPTX
10 Reasons to Use Wordpress
PPT
PPT
Crossover
PDF
171dreamweaver
Ria Development With Flex And PHP
Flash platform introduction
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Getting Started with Flex and PHP
My view on XPages
MikeTaulty_Ux_Update
Introduction to Microsoft Silverlight
Evolution of Applications & Web
Tech Stack Ideas
Past, present, and future of web assembly - Devfest Nantes 2017
Architecting RIAs
Concepts of Asp.Net
introduction to Lamp Stack
10 Reasons to Use Wordpress
Crossover
171dreamweaver
Ad

Similar to A Brief Intro to Adobe Flex (20)

PPTX
Flex Introduction
PPT
Introduction to Adobe Flex - Zaloni
PDF
Adobe Flex - Developing Rich Internet Application Workshop Day 2
PPT
Flex introduction
PDF
A Look at Flex and PHP
PDF
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
PDF
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
PPS
Afik Gal @alphageeks: Flex Intro
PPT
PPTX
Full Stack Web Development | MAGES Institute
PPTX
[DanNotes] XPages - Beyound the Basics
PPT
Adobe® Flex™
PPT
What is Adobe Flex ?
PPT
Building a Real-World Application with Adobe Flex 2
PPT
Flex 3 - Introduction
PPT
Flex And Ria
PPT
Flex RIA
PPT
XPages -Beyond the Basics
PPT
Extension Library - Viagra for XPages
PPT
Flex_Basic_Training
Flex Introduction
Introduction to Adobe Flex - Zaloni
Adobe Flex - Developing Rich Internet Application Workshop Day 2
Flex introduction
A Look at Flex and PHP
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
Afik Gal @alphageeks: Flex Intro
Full Stack Web Development | MAGES Institute
[DanNotes] XPages - Beyound the Basics
Adobe® Flex™
What is Adobe Flex ?
Building a Real-World Application with Adobe Flex 2
Flex 3 - Introduction
Flex And Ria
Flex RIA
XPages -Beyond the Basics
Extension Library - Viagra for XPages
Flex_Basic_Training
Ad

More from Chad Udell (20)

PPTX
DevLearn 2018 - Designing AR Experiences for Performance Support
PPTX
ATD - Western Michigan September Meeting
PDF
Atd 2015 - Mastering Mobile Learning
PPT
Leveraging Devices to Create Amazing Mobile Learning - TK2014 Results
PDF
Mlearning Unraveled - With Poll Results
PPT
Tappestry Demo
PDF
Prototyping
PDF
Whats Next for Mobile Learning
PPT
There Is No Easy Button
KEY
Learning Tracking Out of the LMS and Embracing Learning Analytics
KEY
The Leadership Challenge - mLearnCon
PDF
Design concepts for Mobile Learnng
PPTX
ASTD St. Louis Presentation - July 28th
PPTX
Is Mobile For Me? What Skills Do I Need?
KEY
How to Convert Your eLearning to Mobile
PDF
Max 2010- Building Mobile Learning with Your Existing eLearning Toolkit - Ado...
PDF
Comparing the Four Main Mobile OSes
PDF
Creating mLearning With Your Existing Toolkit
PDF
Hacking Robots for Fun and Profit
PDF
Hacking Robots for Fun and Profit
DevLearn 2018 - Designing AR Experiences for Performance Support
ATD - Western Michigan September Meeting
Atd 2015 - Mastering Mobile Learning
Leveraging Devices to Create Amazing Mobile Learning - TK2014 Results
Mlearning Unraveled - With Poll Results
Tappestry Demo
Prototyping
Whats Next for Mobile Learning
There Is No Easy Button
Learning Tracking Out of the LMS and Embracing Learning Analytics
The Leadership Challenge - mLearnCon
Design concepts for Mobile Learnng
ASTD St. Louis Presentation - July 28th
Is Mobile For Me? What Skills Do I Need?
How to Convert Your eLearning to Mobile
Max 2010- Building Mobile Learning with Your Existing eLearning Toolkit - Ado...
Comparing the Four Main Mobile OSes
Creating mLearning With Your Existing Toolkit
Hacking Robots for Fun and Profit
Hacking Robots for Fun and Profit

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

A Brief Intro to Adobe Flex

  • 2. Intro to Adobe Flex A brief introduction to Adobe’s RIA development tool.
  • 4. What is Flex? • Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs).
  • 5. What is Flex? • Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs). • A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air.
  • 6. What is Flex? • Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs). • A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air. • Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs
  • 7. What is Flex? • Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs). • A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air. • Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs • A competitor or compliment to AJAX, JavaFX, Silverlight (depends who you ask and in what context)
  • 8. What is Flex? • Flex is a a cross-platform development framework for creating Rich Internet Applications (RIAs). • A component based tool that you can use to develop apps that run using the Flash Player or Adobe Air. • Adobe Flex Builder™ software is an Eclipse™ based IDE for developing RIAs • A competitor or compliment to AJAX, JavaFX, Silverlight (depends who you ask and in what context) • Very cool
  • 10. What isn’t Flex? • It’s not a timeline based animation tool
  • 11. What isn’t Flex? • It’s not a timeline based animation tool • It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse
  • 12. What isn’t Flex? • It’s not a timeline based animation tool • It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse • It’s not a server-side language
  • 13. What isn’t Flex? • It’s not a timeline based animation tool • It’s not expensive - It’s actually available for students for free and also as an open source plug-in for Eclipse • It’s not a server-side language • It’s not an answer for everything
  • 15. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP
  • 16. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP • Built in Eclipse, compiled on the server
  • 17. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP • Built in Eclipse, compiled on the server • It was expensive
  • 18. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP • Built in Eclipse, compiled on the server • It was expensive • Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has just launched with 4 not too far behind.
  • 19. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP • Built in Eclipse, compiled on the server • It was expensive • Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has just launched with 4 not too far behind. • Opensourced in 2007. SDK/Compiler can be downloaded and snapped into Eclipse for free.
  • 20. Origins of Flex • Flex 1 and 1.5 were server based languages where MXML was compiled/executed at request time, like ColdFusion or PHP • Built in Eclipse, compiled on the server • It was expensive • Adobe saw value in the Flash Platform, bought Macromedia and has embraced the framework, version 3 has just launched with 4 not too far behind. • Opensourced in 2007. SDK/Compiler can be downloaded and snapped into Eclipse for free. • Education version is also free
  • 22. Current State of Flex • Growing quickly: • Developers are embracing MXML and AS3. • The player has nearly a 95% penetration rate. • Dependable and Fast: Flex content looks like Flex content on every browser. • Easy to debug - Compile time errors, profiler, refactoring support
  • 23. Current State of Flex • Growing quickly: • Developers are embracing MXML and AS3. • The player has nearly a 95% penetration rate. • Dependable and Fast: Flex content looks like Flex content on every browser. • Easy to debug - Compile time errors, profiler, refactoring support • Flex blogs, books, tutorials and conferences are exploding
  • 24. Current State of Flex • Growing quickly: • Developers are embracing MXML and AS3. • The player has nearly a 95% penetration rate. • Dependable and Fast: Flex content looks like Flex content on every browser. • Easy to debug - Compile time errors, profiler, refactoring support • Flex blogs, books, tutorials and conferences are exploding • Flex related job listings are also exploding
  • 26. Basics of Flex • Runs in the Flash Player or AIR
  • 27. Basics of Flex • Runs in the Flash Player or AIR • Tag based markup MXML serves as the basis for Flex projects
  • 28. Basics of Flex • Runs in the Flash Player or AIR • Tag based markup MXML serves as the basis for Flex projects • MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag>
  • 29. Basics of Flex • Runs in the Flash Player or AIR • Tag based markup MXML serves as the basis for Flex projects • MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag> • Component based development: Containers/Layout Components, UI Elements, Data Connectors, more
  • 30. Basics of Flex • Runs in the Flash Player or AIR • Tag based markup MXML serves as the basis for Flex projects • MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag> • Component based development: Containers/Layout Components, UI Elements, Data Connectors, more • Actionscript 3 can be used to add behaviors or other interactivity not covered by MXML
  • 31. Basics of Flex • Runs in the Flash Player or AIR • Tag based markup MXML serves as the basis for Flex projects • MXML is a custom XML namespace, looks like <mx:MyTag></mx:MyTag> • Component based development: Containers/Layout Components, UI Elements, Data Connectors, more • Actionscript 3 can be used to add behaviors or other interactivity not covered by MXML • Supports common OOP practices like MVC patterns, code behind, etc.
  • 32. Basic of Flex Continued
  • 33. Basic of Flex Continued • MXML components can be brought onto the canvas via the GUI similar to Dreamweaver or VisualStudio • Markup can be written by hand with code assist, too. Again, similar to Dreamweaver or VisualStudio • MXML components have attributes that allow for modification of appearance or behavior • Components can be extended for additional capabilities or reuse via MXML or AS or a combo of both. • Containers control layout (Canvas, Vertical Box, Horizontal Box) • UI components display data, control interactivity or display states or other visual feedback (Datagrids, lists, buttons, selects menus, radio buttons, etc.) • Data components load or send data (Services, XML, Remoting, etc) • Other tags include: Script, Style, etc. • Tags can be nested similar to HTML/XML
  • 35. Designing Interfaces in Flex • CSS can be used to style the components • Flash, PNGs, and JPGs can be used to skin the components, too • Illustrator, Photoshop, Fireworks, Flash all have component design sets to assist in UI skinning • Constraint based layouts and percentage based placements make polished, uniform layouts much easier
  • 36. My First Flex App: Hello World
  • 37. My First Flex App: Hello World <?xml version="1.0" encoding="utf-8"?>
  • 38. My First Flex App: Hello World <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
  • 39. My First Flex App: Hello World <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label x="10" y="10" text="Output" id="output"/>
  • 40. My First Flex App: Hello World <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label x="10" y="10" text="Output" id="output"/> <mx:Button x="10" y="36" label="Click Me" click="{output.text = 'Hello World'}"/>
  • 41. My First Flex App: Hello World <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label x="10" y="10" text="Output" id="output"/> <mx:Button x="10" y="36" label="Click Me" click="{output.text = 'Hello World'}"/> </mx:Application>
  • 42. My First Okay Flex App: Hello World from XML
  • 43. My First Okay Flex App: Hello World from XML <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ //my favorite little random function - seed with floor and ceiling and it brings back a random integer from the range public function randRange(min:Number, max:Number):Number { var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min; return randomNum; } ]]> </mx:Script> <mx:XML id="myXML" xmlns=""> <greetings> <greeting>Hola Mundo</greeting> <greeting>Hello World</greeting> <greeting>Ciao Mondo</greeting> <greeting>Hallo welt</greeting> <greeting> </greeting> </greetings> </mx:XML> <mx:Label x="10" y="10" text="Output" id="output"/> <mx:Button x="10" y="36" label="Click Me" click="{output.text = myXML.greeting[randRange(0, 4)].valueOf()}"/> </mx:Application>
  • 44. My First More Okay Flex App: Hello World from External XML
  • 45. My First More Okay Flex App: Hello World from External XML <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ //my favorite little random function - seed with floor and ceiling and it brings back a random integer from the range public function randRange(min:Number, max:Number):Number { var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min; return randomNum; } ]]> </mx:Script> <mx:XML id="myXML" source="externalXML.xml" xmlns="" /> <mx:Label x="10" y="10" text="Output" id="output"/> <mx:Button x="10" y="36" label="Click Me" click="{output.text = myXML.greeting[randRange(0, 4)].valueOf()}"/> </mx:Application>
  • 46. More Flex Info • adobe.com/flex • flex.org • weblogs.macromedia.com/mxna • opensource.adobe.com • visualrinse.com • 30onair.com
  • 47. Enough yakking, let’s code • Cross your fingers • Stick around to heckle and get some freebies