SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
MAKING MOBILE FLEX APPS
BLAZING FAST
Michał Wróblewski
ABOUT


 @wrobel221
 Live in Poznań, Poland

 We make games in
  BlackMoon Design
 I come from Świebodzin
QUICK OUTLINE
 Quick  intro to Flex Mobile.
 A hard way from 5 FPS to 30+ FPS?

 Tricks’n’Tips

 The Robotlegs Way

 Q&A
SOMETHING ABOUT YOU
   How many of you got your hands dirty with mobile
    (especially Flex Mobile) development?
QUICK INTRO - VIEWNAVIGATORAPPLICATION



  You   can choose one of these:
   ViewNavigatorApplication
   TabbedViewNavigatorApplication

   SplitViewNavigatorApplication
    (coming with Flex 4.6)
QUICK INTRO - VIEWNAVIGATORAPPLICATION



 Contains an instance(s) of
  ViewNavigator(s).
 You setup some global properties of
  your app e.g, ActionBar content
QUICK INTRO - VIEWNAVIGATORAPPLICATION
QUICK INTRO - VIEWNAVIGATORAPPLICATION
QUICK INTRO - VIEWNAVIGATOR
 Manages moving between views.
 Has a stack of view data objects

 By default only one view exists, others are
  destroyed after remove (only data persists)
 Setup of default transitions

 Access to current view
QUICK INTRO - VIEWNAVIGATOR
   Navigation methods:
       replaceView,
       pushView,
       popView,
       popToFirstView,
       popAll
QUICK INTRO - VIEWNAVIGATOR
   Skin states:
       portrait,
       landscape,
       portraitAndOverlay,
       landscapeAndOverlay
QUICK INTRO - VIEW
 Visual container for a view of your mobile app.
 You should only add mobile-optimised Flex
  components here
 Accepts data passed in pushView

 Returns data by overriding createReturnObject()

 Has destructionPolicy (default – auto) to control
  whether the view should be destroyed on pop or
  just cached.
 Setup menu by placing ViewMenuItem in a
  <s:viewMenuItems> tag.
QUICK INTRO – COMMONS
 Label
 Icon

 actionContent

 navigationContent
OPTIMIZATION
OPTIMIZATION - BITMAPS
OPTIMIZATION - BITMAPS
   BitmapImage:
       Extends GraphicElement
       Remote loading
       Scaling
       Caching
OPTIMIZATION - BITMAPS
   Image (spark)
       Extends SkinnableComponent
       Has BitmapImage
       Supports progress
       Broken image icon
       Custom skinning
OPTIMIZATION - BITMAPS
 BitmapImage 3x faster than spark Image
 Try to avoid compressed image formats like JPG

 Do caching (on by default) and queuing (off by
  default) by using ContentCache. Assign it to
  contentLoader property of BitmapImage and Image
OPTIMIZATION - TEXT
 RichEditableText
 RichText

 Label

 StyleableTextField (new in Flex 4.5)

 StageText (coming in Flex 4.6)
OPTIMIZATION - TEXT
 Only StyleableTextField extends flash.text.TextField
 Can’t use StyleableTextField directly in MXML, so
  you’re quite pushed to use it in AS3.
OPTIMIZATION – LISTS AND ITEMRENDERERS
 All mentioned before apply
 uber-optimized LabelItemRenderer and
  IconItemRenderer
OPTIMIZATION – LISTS AND ITEMRENDERERS
 Mobile item renderers – if possible use bundler
  uber-optimized LabelItemRenderer and
  IconItemRenderer, they were shown in all Flex
  Mobile demos.
 Avoid complex binding expressions.
 Turn off autoDrawBackground if not needed.
 Use cacheAsBitmap, but be careful.
 Use opaqueBackground
 itemRendererFunction prevents pooling and
  recycling.
 Favor FXG over spark graphic elements (if
  possible)
OPTIMIZATION - SKINS
 Extend MobileSkin instead of SparkSkin
 AS3 version will perform better than MXML

 Use FXG for static vector graphics, use where
  possible
 Use GraphicElement as lightweight graphic
  primitives. E.g. Backgrounds, borders etc.
TRICKS’N’TIPS
 Adding    platform specific UI patterns
     CSS media rules
     Separate projects with common code base
     Ready multiplatform mobile themes
TRICKS’N’TIPS
 Handlingmulti DPI devices with
 MultiDPIBitmapSource
TRICKS’N’TIPS
 Be sure not to put references to view
 instances anywhere.
TRICKS’N’TIPS
 Don’t interfere expensive process of parsing
  data into view when doing a transition.
 Use BusyIndicator before or after transition.
TRICKS’N’TIPS
 Don’t
      cheat by testing your app on a high-end
 smartphone
TRICKS’N’TIPS
 Please   don’t use filters.
TRICKS’N’TIPS
 Have   memory usage and limitations in mind
TRICKS’N’TIPS
 On  every level make your display list as flat
  as possible.
 Use Shaun’s script to show more info about
  the display list tree
TRICKS’N’TIPS
 At   the end:
 [profile, test, optimize].loop()
THE ROBOTLEGS WAY
THE ROBOTLEGS WAY
   “I and my team have been using Robotlegs to build
    several apps for many months, and I've never had
    any issues caused by Robotlegs”
                                  Paul Robertson
THE ROBOTLEGS WAY
 Views are being destroyed when you push a new
  view.
 The same will happen with Mediators
THE ROBOTLEGS WAY
   You’ll need an instance of ViewNavigator in your
    navigator manager.
THE ROBOTLEGS WAY
 Don’t hesitate to use viewManager in your View.
 Dispatch a command only if you need some data
  from the rest of the application.
THE ROBOTLEGS WAY
A QUESTION TO YOU
 Howdo you approach multiscreen
 development?
THANKS!
 Any   questions?

Más contenido relacionado

Similar a Making mobile flex apps blazing fast

Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesRyan Stewart
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Paris Android User Group
 
Assignment 4 Paparazzi1
Assignment 4 Paparazzi1Assignment 4 Paparazzi1
Assignment 4 Paparazzi1Mahmoud
 
Android Development with Flash Builder Burrito
Android Development with Flash Builder BurritoAndroid Development with Flash Builder Burrito
Android Development with Flash Builder BurritoJeff Bollinger
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 mayLuciano Amodio
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekDr. Felix Raab
 
Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentDavid Catuhe
 
Flash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen DevelopmentFlash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen DevelopmentRyan Stewart
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
Silverlight overview
Silverlight overviewSilverlight overview
Silverlight overviewTaras Romanyk
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
AD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
AD503: XPages Mobile Development in IBM Domino 9.0.1 and BeyondAD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
AD503: XPages Mobile Development in IBM Domino 9.0.1 and BeyondTony McGuckin
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik Das
 
Google Associate Android Developer Certification
Google Associate Android Developer CertificationGoogle Associate Android Developer Certification
Google Associate Android Developer CertificationMonir Zzaman
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsMotorola Mobility - MOTODEV
 
Development With eRCP
Development With eRCPDevelopment With eRCP
Development With eRCPGorkem Ercan
 

Similar a Making mobile flex apps blazing fast (20)

Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile Devices
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
Assignment 4 Paparazzi1
Assignment 4 Paparazzi1Assignment 4 Paparazzi1
Assignment 4 Paparazzi1
 
Android Development with Flash Builder Burrito
Android Development with Flash Builder BurritoAndroid Development with Flash Builder Burrito
Android Development with Flash Builder Burrito
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 may
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application development
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Flash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen DevelopmentFlash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen Development
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Twitter trends
Twitter trendsTwitter trends
Twitter trends
 
Silverlight overview
Silverlight overviewSilverlight overview
Silverlight overview
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
AD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
AD503: XPages Mobile Development in IBM Domino 9.0.1 and BeyondAD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
AD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
 
Open sap ui5 - week_2 unit_1_syjewa_exercises
Open sap ui5  - week_2 unit_1_syjewa_exercisesOpen sap ui5  - week_2 unit_1_syjewa_exercises
Open sap ui5 - week_2 unit_1_syjewa_exercises
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Google Associate Android Developer Certification
Google Associate Android Developer CertificationGoogle Associate Android Developer Certification
Google Associate Android Developer Certification
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
 
Development With eRCP
Development With eRCPDevelopment With eRCP
Development With eRCP
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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 CVKhem
 
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.pdfUK Journal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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 organizationRadu Cotescu
 
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 RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Making mobile flex apps blazing fast

  • 1. MAKING MOBILE FLEX APPS BLAZING FAST Michał Wróblewski
  • 2. ABOUT  @wrobel221  Live in Poznań, Poland  We make games in BlackMoon Design  I come from Świebodzin
  • 3. QUICK OUTLINE  Quick intro to Flex Mobile.  A hard way from 5 FPS to 30+ FPS?  Tricks’n’Tips  The Robotlegs Way  Q&A
  • 4. SOMETHING ABOUT YOU  How many of you got your hands dirty with mobile (especially Flex Mobile) development?
  • 5. QUICK INTRO - VIEWNAVIGATORAPPLICATION  You can choose one of these: ViewNavigatorApplication TabbedViewNavigatorApplication SplitViewNavigatorApplication (coming with Flex 4.6)
  • 6. QUICK INTRO - VIEWNAVIGATORAPPLICATION  Contains an instance(s) of ViewNavigator(s).  You setup some global properties of your app e.g, ActionBar content
  • 7. QUICK INTRO - VIEWNAVIGATORAPPLICATION
  • 8. QUICK INTRO - VIEWNAVIGATORAPPLICATION
  • 9. QUICK INTRO - VIEWNAVIGATOR  Manages moving between views.  Has a stack of view data objects  By default only one view exists, others are destroyed after remove (only data persists)  Setup of default transitions  Access to current view
  • 10. QUICK INTRO - VIEWNAVIGATOR  Navigation methods:  replaceView,  pushView,  popView,  popToFirstView,  popAll
  • 11. QUICK INTRO - VIEWNAVIGATOR  Skin states:  portrait,  landscape,  portraitAndOverlay,  landscapeAndOverlay
  • 12. QUICK INTRO - VIEW  Visual container for a view of your mobile app.  You should only add mobile-optimised Flex components here  Accepts data passed in pushView  Returns data by overriding createReturnObject()  Has destructionPolicy (default – auto) to control whether the view should be destroyed on pop or just cached.  Setup menu by placing ViewMenuItem in a <s:viewMenuItems> tag.
  • 13. QUICK INTRO – COMMONS  Label  Icon  actionContent  navigationContent
  • 16. OPTIMIZATION - BITMAPS  BitmapImage:  Extends GraphicElement  Remote loading  Scaling  Caching
  • 17. OPTIMIZATION - BITMAPS  Image (spark)  Extends SkinnableComponent  Has BitmapImage  Supports progress  Broken image icon  Custom skinning
  • 18. OPTIMIZATION - BITMAPS  BitmapImage 3x faster than spark Image  Try to avoid compressed image formats like JPG  Do caching (on by default) and queuing (off by default) by using ContentCache. Assign it to contentLoader property of BitmapImage and Image
  • 19. OPTIMIZATION - TEXT  RichEditableText  RichText  Label  StyleableTextField (new in Flex 4.5)  StageText (coming in Flex 4.6)
  • 20. OPTIMIZATION - TEXT  Only StyleableTextField extends flash.text.TextField  Can’t use StyleableTextField directly in MXML, so you’re quite pushed to use it in AS3.
  • 21. OPTIMIZATION – LISTS AND ITEMRENDERERS  All mentioned before apply  uber-optimized LabelItemRenderer and IconItemRenderer
  • 22. OPTIMIZATION – LISTS AND ITEMRENDERERS  Mobile item renderers – if possible use bundler uber-optimized LabelItemRenderer and IconItemRenderer, they were shown in all Flex Mobile demos.  Avoid complex binding expressions.  Turn off autoDrawBackground if not needed.  Use cacheAsBitmap, but be careful.  Use opaqueBackground  itemRendererFunction prevents pooling and recycling.  Favor FXG over spark graphic elements (if possible)
  • 23. OPTIMIZATION - SKINS  Extend MobileSkin instead of SparkSkin  AS3 version will perform better than MXML  Use FXG for static vector graphics, use where possible  Use GraphicElement as lightweight graphic primitives. E.g. Backgrounds, borders etc.
  • 24. TRICKS’N’TIPS  Adding platform specific UI patterns  CSS media rules  Separate projects with common code base  Ready multiplatform mobile themes
  • 25. TRICKS’N’TIPS  Handlingmulti DPI devices with MultiDPIBitmapSource
  • 26. TRICKS’N’TIPS  Be sure not to put references to view instances anywhere.
  • 27. TRICKS’N’TIPS  Don’t interfere expensive process of parsing data into view when doing a transition.  Use BusyIndicator before or after transition.
  • 28. TRICKS’N’TIPS  Don’t cheat by testing your app on a high-end smartphone
  • 29. TRICKS’N’TIPS  Please don’t use filters.
  • 30. TRICKS’N’TIPS  Have memory usage and limitations in mind
  • 31. TRICKS’N’TIPS  On every level make your display list as flat as possible.  Use Shaun’s script to show more info about the display list tree
  • 32. TRICKS’N’TIPS  At the end: [profile, test, optimize].loop()
  • 34. THE ROBOTLEGS WAY  “I and my team have been using Robotlegs to build several apps for many months, and I've never had any issues caused by Robotlegs” Paul Robertson
  • 35. THE ROBOTLEGS WAY  Views are being destroyed when you push a new view.  The same will happen with Mediators
  • 36. THE ROBOTLEGS WAY  You’ll need an instance of ViewNavigator in your navigator manager.
  • 37. THE ROBOTLEGS WAY  Don’t hesitate to use viewManager in your View.  Dispatch a command only if you need some data from the rest of the application.
  • 39. A QUESTION TO YOU  Howdo you approach multiscreen development?
  • 40. THANKS!  Any questions?