SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
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?

Weitere ähnliche Inhalte

Ähnlich wie Making mobile flex apps blazing fast

Assignment 4 Paparazzi1
Assignment 4 Paparazzi1Assignment 4 Paparazzi1
Assignment 4 Paparazzi1
Mahmoud
 
Android Development with Flash Builder Burrito
Android Development with Flash Builder BurritoAndroid Development with Flash Builder Burrito
Android Development with Flash Builder Burrito
Jeff Bollinger
 
Silverlight overview
Silverlight overviewSilverlight overview
Silverlight overview
Taras Romanyk
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
Hussain Behestee
 

Ähnlich wie 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
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

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?