SlideShare a Scribd company logo
1 of 38
Fine Tuning
Hybrid Mobile Apps
So, what is a
hybrid?
Perception of Performance
0.1 second
1 second
10 seconds
Weber-Fechner Law
20%noticeable
improvement
Button Response
• The dreaded 300ms delay
300 ms 0 ms
Button Response
• Use click library:
– Fastclick.js
– Angular Touch
• Disable zoom
Button Response
• Use div and ng-click
Define Button Active State
Mobile Network
• Network latency is the greatest contributor of
slooow response.
• Thus, reduce network access.
• Should we render pages from the server?
Use Single Page App
Or Appgyver Multipage App
Enable Gzip Compression
60 - 70% Compression
Enable gzip support on server.
mod_gzip, server.xml, etc.
Enable gzip support on client, if necessary.
Enable Gzip Compression
Check using Chrome Developer Tool > Network.
Use Websocket
• Websocket is already supported using Javascript
on mobile.
• Transfer data in JSON format. Encoding and
decoding is built-in using Javascript
Handle Offline and Slow Network
• Check if online using navigator…
Handle Offline and Slow Network
1. Setup a timer
Handle Offline and Slow Network
Use Status Indicators
• Native Shell
• Native Navigation
• Webview Content
David Heinemeir Hansson,
Creator of Ruby on Rails
Database Queries
• Usual SQL Query optimization applies
• Using paging with unlimited scroll
– Append LIMIT X OFFSET Y in SQL Query
– Check end of scroll
Displaying Lists and Scrolls
• when displaying with
more than 300 items:
– Review UX
– Avoid ng-repeat, or use
‘track by’ to avoid
rebuilding the DOM
– Use plain Javascript and
database query
Displaying Lists and Scrolls
Displaying Lists and Scrolls
• Reverting to angular scope from Javascript
Use Full Text Search
• Hooray! SqlLite supports Full Text Search
(FTS3, FTS4)
CREATE VIRTUAL TABLE papers USING fts3(subject,
body);
SELECT * FROM mail WHERE body MATCH 'sqlite';
• Test Results with over 100k records - FTS is
61% faster than ‘like’
Local Storage
• Store data on local as cache
– Local Storage
– Local Database
• Use local storage for temporary storage.
• Use database for persistent storage.
http://gonehybrid.com/dont-assume-localstorage-will-always-
work-in-your-hybrid-app/
CSS Animation
CSS Animation
Track Events and Error
• User activity and events are crucial to
usability.
• Tracking events is key to great application
design.
• Several solutions available: Crashlytics,
Rollbar, Mixpanel, Google Analytics,
Minimize Browser Reflow
• Generated HTML offline
• Reduce depth of DOM
• Avoid unnecessary complex CSS selector
Other Rendering Tips
• Optimize images to avoid resizing
• Use SVG instead of Images
• Use image sprites
• Avoid Shadows and Gradients
• Consider using SPDY / HTTP2 Protocol
• Use Crosswalk
Chrome Dev Tools
Chrome Dev Tools
Unit Tests
• Jasmine and Karma for Behavior Driven
Testing
Thank You
Allan C. Tan, SCEA, PMP
CEO/President
Email: allan@ideyatech.com
http://www.ideyatech.com/
allanctan
@allanctan ph.linkedin.com/in/allanctan/
Resources
• http://social.technet.microsoft.com/wiki/contents/article
s/27828.windows-phone-cross-platform-mobile-
architecture.aspx
• https://signalvnoise.com/posts/3743-hybrid-sweet-spot-
native-navigation-web-content
• https://engineering.linkedin.com/mobile/linkedin-ipad-
nativeweb-messaging-bridge-and-websockets
• http://blog.smartbear.com/web-monitoring/all-im-
offering-you-is-the-truth/
• http://www.nngroup.com/articles/powers-of-10-time-
scales-in-ux/

More Related Content

What's hot

Top4top Showcase
Top4top ShowcaseTop4top Showcase
Top4top Showcaseay4
 
Full Throttle Websites
Full Throttle WebsitesFull Throttle Websites
Full Throttle WebsitesAndrew Dixon
 
Building Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldBuilding Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldOren Eini
 
Using AWS CloudFront with S3 at SMARTSTUDY
Using AWS CloudFront with S3 at SMARTSTUDYUsing AWS CloudFront with S3 at SMARTSTUDY
Using AWS CloudFront with S3 at SMARTSTUDYHyun-woo Park
 
OTP System with AWS Serverless
OTP System with AWS ServerlessOTP System with AWS Serverless
OTP System with AWS ServerlessPubudu Jayawardana
 
How to Boost WordPress Site Speed in 10 Steps
How to Boost WordPress Site Speed in 10 StepsHow to Boost WordPress Site Speed in 10 Steps
How to Boost WordPress Site Speed in 10 StepsLazylord
 
Cloud Computing Soup To Nuts
Cloud Computing Soup To NutsCloud Computing Soup To Nuts
Cloud Computing Soup To NutsJoe Drumgoole
 
Big Data in a Public Cloud
Big Data in a Public CloudBig Data in a Public Cloud
Big Data in a Public CloudCloudSigma
 
Mailerqnewpresentation
MailerqnewpresentationMailerqnewpresentation
MailerqnewpresentationCopernica BV
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioJonathan LeBlanc
 
Data storage for the cloud ce11
Data storage for the cloud ce11Data storage for the cloud ce11
Data storage for the cloud ce11aseager
 
Data Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSJohn McCormack
 
C# Job System + ECS Usage and Demo with Intel
C# Job System + ECS Usage and Demo with IntelC# Job System + ECS Usage and Demo with Intel
C# Job System + ECS Usage and Demo with IntelUnity Technologies
 

What's hot (17)

Top4top Showcase
Top4top ShowcaseTop4top Showcase
Top4top Showcase
 
Full Throttle Websites
Full Throttle WebsitesFull Throttle Websites
Full Throttle Websites
 
Building Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldBuilding Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics world
 
Harnessing The Cloud
Harnessing The CloudHarnessing The Cloud
Harnessing The Cloud
 
Using AWS CloudFront with S3 at SMARTSTUDY
Using AWS CloudFront with S3 at SMARTSTUDYUsing AWS CloudFront with S3 at SMARTSTUDY
Using AWS CloudFront with S3 at SMARTSTUDY
 
Optimizing Java Performance
Optimizing Java PerformanceOptimizing Java Performance
Optimizing Java Performance
 
OTP System with AWS Serverless
OTP System with AWS ServerlessOTP System with AWS Serverless
OTP System with AWS Serverless
 
Web mashups with NodeJS
Web mashups with NodeJSWeb mashups with NodeJS
Web mashups with NodeJS
 
How to Boost WordPress Site Speed in 10 Steps
How to Boost WordPress Site Speed in 10 StepsHow to Boost WordPress Site Speed in 10 Steps
How to Boost WordPress Site Speed in 10 Steps
 
Cloud Computing Soup To Nuts
Cloud Computing Soup To NutsCloud Computing Soup To Nuts
Cloud Computing Soup To Nuts
 
Big Data in a Public Cloud
Big Data in a Public CloudBig Data in a Public Cloud
Big Data in a Public Cloud
 
Mailerqnewpresentation
MailerqnewpresentationMailerqnewpresentation
Mailerqnewpresentation
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
 
Data storage for the cloud ce11
Data storage for the cloud ce11Data storage for the cloud ce11
Data storage for the cloud ce11
 
Data Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWS
 
Azure Web Sites
Azure Web SitesAzure Web Sites
Azure Web Sites
 
C# Job System + ECS Usage and Demo with Intel
C# Job System + ECS Usage and Demo with IntelC# Job System + ECS Usage and Demo with Intel
C# Job System + ECS Usage and Demo with Intel
 

Viewers also liked

Presentación cinética química
Presentación cinética químicaPresentación cinética química
Presentación cinética químicaMiguelCh90
 
Руководство по восхождению на вершину успеха от Пауло Коэльо
Руководство по восхождению на вершину успеха от Пауло КоэльоРуководство по восхождению на вершину успеха от Пауло Коэльо
Руководство по восхождению на вершину успеха от Пауло КоэльоDmytro Voytko
 
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...davidtrebolle
 
SOLATUBE Cairo scp May 17th 2016 v3.1
SOLATUBE Cairo scp May 17th 2016 v3.1SOLATUBE Cairo scp May 17th 2016 v3.1
SOLATUBE Cairo scp May 17th 2016 v3.1TAQAMISR
 
Cim (Centro Integrado de Mercaderías)
Cim (Centro Integrado de Mercaderías)Cim (Centro Integrado de Mercaderías)
Cim (Centro Integrado de Mercaderías)César Valdés P.
 
Botswana Private Sector Development
Botswana Private Sector DevelopmentBotswana Private Sector Development
Botswana Private Sector DevelopmentThapelo Lippe
 
Medición de flujo
Medición de flujoMedición de flujo
Medición de flujoMiguelCh90
 
Emerging trends in medical tourism marketing by dr prem jagyasi
Emerging trends in medical tourism marketing by dr prem jagyasiEmerging trends in medical tourism marketing by dr prem jagyasi
Emerging trends in medical tourism marketing by dr prem jagyasiDr Prem Jagyasi
 
Basics of fisheries and aquaculture
Basics of fisheries and aquacultureBasics of fisheries and aquaculture
Basics of fisheries and aquacultureMUHAMMED ANZEER F
 
пленарка готово
пленарка готовопленарка готово
пленарка готовоEelmaa Yuri
 

Viewers also liked (20)

Rutas
RutasRutas
Rutas
 
Presentación cinética química
Presentación cinética químicaPresentación cinética química
Presentación cinética química
 
Руководство по восхождению на вершину успеха от Пауло Коэльо
Руководство по восхождению на вершину успеха от Пауло КоэльоРуководство по восхождению на вершину успеха от Пауло Коэльо
Руководство по восхождению на вершину успеха от Пауло Коэльо
 
Bolsas activas, 18 oct13
Bolsas activas, 18 oct13Bolsas activas, 18 oct13
Bolsas activas, 18 oct13
 
Mpc 12.27.15 unfinished business
Mpc 12.27.15 unfinished businessMpc 12.27.15 unfinished business
Mpc 12.27.15 unfinished business
 
Foipressy2
Foipressy2Foipressy2
Foipressy2
 
Conversations
ConversationsConversations
Conversations
 
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...
PLANNING OF THE DISTRIBUTION GRIDS WITH DISTRIBUTED GENERATION AND DEMAND SID...
 
SOLATUBE Cairo scp May 17th 2016 v3.1
SOLATUBE Cairo scp May 17th 2016 v3.1SOLATUBE Cairo scp May 17th 2016 v3.1
SOLATUBE Cairo scp May 17th 2016 v3.1
 
certificate of graduation (bachelor)
certificate of graduation (bachelor)certificate of graduation (bachelor)
certificate of graduation (bachelor)
 
atlantavoice2
atlantavoice2atlantavoice2
atlantavoice2
 
Cim (Centro Integrado de Mercaderías)
Cim (Centro Integrado de Mercaderías)Cim (Centro Integrado de Mercaderías)
Cim (Centro Integrado de Mercaderías)
 
Macmoney presentacion de empresa
Macmoney presentacion de empresaMacmoney presentacion de empresa
Macmoney presentacion de empresa
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Botswana Private Sector Development
Botswana Private Sector DevelopmentBotswana Private Sector Development
Botswana Private Sector Development
 
Medición de flujo
Medición de flujoMedición de flujo
Medición de flujo
 
Equilibrio químico
Equilibrio químicoEquilibrio químico
Equilibrio químico
 
Emerging trends in medical tourism marketing by dr prem jagyasi
Emerging trends in medical tourism marketing by dr prem jagyasiEmerging trends in medical tourism marketing by dr prem jagyasi
Emerging trends in medical tourism marketing by dr prem jagyasi
 
Basics of fisheries and aquaculture
Basics of fisheries and aquacultureBasics of fisheries and aquaculture
Basics of fisheries and aquaculture
 
пленарка готово
пленарка готовопленарка готово
пленарка готово
 

Similar to Fine tuning Hybrid Mobile App

AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster WebsitesCraig Walker
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ XeroCraig Walker
 
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013Amazon Web Services
 
Web Performance - Learnings from Velocity Conference
Web Performance - Learnings from Velocity ConferenceWeb Performance - Learnings from Velocity Conference
Web Performance - Learnings from Velocity ConferenceHardik Shah
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesWesley Hales
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday SeasonG3 Communications
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performanceSagar Desarda
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!Ulrich Krause
 
Delivering Mobile Apps That Perform
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That PerformRuben Goncalves
 
Fast Cordova applications
Fast Cordova applicationsFast Cordova applications
Fast Cordova applicationsIvano Malavolta
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azuredivyapisces
 

Similar to Fine tuning Hybrid Mobile App (20)

AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
 
Web Performance - Learnings from Velocity Conference
Web Performance - Learnings from Velocity ConferenceWeb Performance - Learnings from Velocity Conference
Web Performance - Learnings from Velocity Conference
 
High performance website
High performance websiteHigh performance website
High performance website
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!
 
Delivering Mobile Apps That Perform
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That Perform
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
 
Fast Cordova applications
Fast Cordova applicationsFast Cordova applications
Fast Cordova applications
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
Life in the Fast Lane: Full Speed XPages!, #dd13
Life in the Fast Lane: Full Speed XPages!, #dd13Life in the Fast Lane: Full Speed XPages!, #dd13
Life in the Fast Lane: Full Speed XPages!, #dd13
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
 

More from Allan Tan

Extending GPT
Extending GPTExtending GPT
Extending GPTAllan Tan
 
Skills of the future
Skills of the futureSkills of the future
Skills of the futureAllan Tan
 
RPA - International Quality Summit
RPA - International Quality SummitRPA - International Quality Summit
RPA - International Quality SummitAllan Tan
 
Softcon - Intelligent Automation: Helping the Future of Workforce
Softcon - Intelligent Automation: Helping the Future of WorkforceSoftcon - Intelligent Automation: Helping the Future of Workforce
Softcon - Intelligent Automation: Helping the Future of WorkforceAllan Tan
 
Naming and positioning
Naming and positioningNaming and positioning
Naming and positioningAllan Tan
 
AI Landscape 2015
AI Landscape 2015AI Landscape 2015
AI Landscape 2015Allan Tan
 
Product development
Product developmentProduct development
Product developmentAllan Tan
 
NSTW IT Career Talk
NSTW IT Career TalkNSTW IT Career Talk
NSTW IT Career TalkAllan Tan
 
From Employee to Entrepreneur
From Employee to EntrepreneurFrom Employee to Entrepreneur
From Employee to EntrepreneurAllan Tan
 
Dlsu nlp in practice
Dlsu   nlp in practiceDlsu   nlp in practice
Dlsu nlp in practiceAllan Tan
 
Transforming Third World with Technology
Transforming Third World with TechnologyTransforming Third World with Technology
Transforming Third World with TechnologyAllan Tan
 
Responsive web introduction
Responsive web introductionResponsive web introduction
Responsive web introductionAllan Tan
 

More from Allan Tan (13)

Extending GPT
Extending GPTExtending GPT
Extending GPT
 
Skills of the future
Skills of the futureSkills of the future
Skills of the future
 
RPA - International Quality Summit
RPA - International Quality SummitRPA - International Quality Summit
RPA - International Quality Summit
 
Softcon - Intelligent Automation: Helping the Future of Workforce
Softcon - Intelligent Automation: Helping the Future of WorkforceSoftcon - Intelligent Automation: Helping the Future of Workforce
Softcon - Intelligent Automation: Helping the Future of Workforce
 
Prototype
PrototypePrototype
Prototype
 
Naming and positioning
Naming and positioningNaming and positioning
Naming and positioning
 
AI Landscape 2015
AI Landscape 2015AI Landscape 2015
AI Landscape 2015
 
Product development
Product developmentProduct development
Product development
 
NSTW IT Career Talk
NSTW IT Career TalkNSTW IT Career Talk
NSTW IT Career Talk
 
From Employee to Entrepreneur
From Employee to EntrepreneurFrom Employee to Entrepreneur
From Employee to Entrepreneur
 
Dlsu nlp in practice
Dlsu   nlp in practiceDlsu   nlp in practice
Dlsu nlp in practice
 
Transforming Third World with Technology
Transforming Third World with TechnologyTransforming Third World with Technology
Transforming Third World with Technology
 
Responsive web introduction
Responsive web introductionResponsive web introduction
Responsive web introduction
 

Fine tuning Hybrid Mobile App

Editor's Notes

  1. Basecamp is 90% html and 10% native.
  2. 10 secs – keep user’s focus 1 secs – keep user flow of thought 0.1 secs – feels instantaneous
  3. Why is there a 300ms delay? Let's suppose the user touches a link in iOS Safari. Because the user has the ability to double tap to zoom or scroll, whenever the user touches the screen, the browser does not instantaneously know whether the user meant to click the link, or is double tapping. Therefore iOS Safari waits 300ms after the first tap to see if the user taps again.
  4. When pages are rendered from the server, updates are easier to deploy. However, latency will make response slower.