SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
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?

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
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
 
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.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
[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.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 WorkerThousandEyes
 
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
 
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
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
[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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
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
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

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?