SlideShare uma empresa Scribd logo
1 de 63
PG Day EU
Building Phonegap apps with
ember-cordova
@alexblom
whoami
Isle of Code
• Maintainer of ember-cordova;
• Historically wrote backend;
• Toronto based;
• Focused on Ember, Cordova & Electron;
Why Cordova & Ember
• Because Ember;
• Cost;
• Hiring;
• Developer sanity;
• Single source;
• Speed of development;
Good Code === Good Hybrid
• Much of making effective mobile is simply writing
good code;
• Desktops let us be lazier;
• JS ecosystem is littered with bad/leaky code;
Ember.js
• Framework for ambitious applications;
• We like it because it forces a very organized approach
to large applications;
• Items like Routing, Controllers, Components are all first
class citizens. Addons can rely on standard behaviour;
LTS Cycle
• LTS Release every 12 weeks (e.g. 2.4/2.8/2.12);
• If you don’t need edge features, it allows you to
control and time an upgrade cycle;
• Because everybody is upgrading at once, the
community is focused;
• LTS releases do receive post security updates;
Default ember-project
Routing
Pods
Components
ember-data
ember-data
• Models can be queried with the store service:
• Tools such as mirage allow you to mock dev
responses with the same models;
Actions
ember-cordova
ember-cordova
• Library for packaging Ember/Cordova applications
together;
• Also includes:
• a build CLI;
• live reload;
• icon/splash generation;
• growing ecosystem of plugins;
ember-cordova
• Is not a UI Library;
• Is not a component library;
• Currently has no opinions on which css
frameworks you should use;
• Does not protect you from bad performance (but
we do publish best practices);
Improved WebViews
• On iOS, the default WebView is a UIWebView;
• ember-cordova will default to the newer and
more performant WKWebView;
• To disable this default, use the following flag:
• `ember cdv:platform add ios —default-
webview;
ember-cordova v
react-native
• ember-cordova allows you to recycle web
components for mobile;
• On a first run, you will need to work more for
performance;
• For more complex apps, having standardized
model/routing/component behaviour we find really
useful;
• For smaller apps, pick your favourite;
Structuring Our App
• When fully recycling an app, we tend to re-
implement layouts but not components;
• Heavy components are an exception;
Structuring our App
config/environment.js
ember-cordova/splash
ember-cordova/events
http://blog.isleofcode.com/the-real-reason-to-avoid-jquery/
A note on deviceready
• You probably need to use it for any custom
initializers;
• Has special handling. Even if you register the
handler after deviceready fires, it will still be
triggered.
Feeling Native
Ghost Clicks
Links will not appear as they have been clicked,
just like a native app.
styles/app.css
Manage Reflows
What causes Reflow?
• Resizing the browser window;
• using JavaScript methods involving computed
styles;
• adding or removing elements from the DOM; and
• changing an element's classes.
• https://developers.google.com/speed/articles/reflo
w
Use CSS Transforms
visibility:hidden
Animations
•
Animations - Velocity
Animation Frames
• ~15ms target;
• Taking longer will clog your thread;
• This 15ms target includes the work your browser
needs to do. Best to target ~10;
• Allows the browser to batch animation work;
Infinite Scrolling
• Occlusion based scroll;
• Smoke & Mirrors:
https://github.com/runspired/smoke-and-mirrors
http://runspired.github.io/smoke-and-mirrors/#/examples/dbmon
Using too much memory has
negative implications
http://www-cs.canisius.edu/~hertzm/gcmalloc-oopsla-2005.pdf
Memory Leaks
• Garbage Collection: 2 types:
• Young Generation & Old Generation
Name closures for
better profiling
https://developer.chrome.com/devtools/docs/javascript-memory-profiling
App size matters
• For Android, 500-750kb target;
• For iOS less of a problem. Served ~2mb without
problems;
https://joreteg.com/blog/viability-of-js-frameworks-on-mobile
http://blog.runspired.com/2016/03/25/the-chrome-distortion-chrome-alters-our-expectations-in-highly-negative-ways/
• window.performance
• window.performance.mark(‘foo’)
PG Day EU
Building Phonegap apps with
ember-cordova
@alexblom

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Architecting for continuous delivery (33rd Degree)
Architecting for continuous delivery (33rd Degree)Architecting for continuous delivery (33rd Degree)
Architecting for continuous delivery (33rd Degree)
 
Continuous deployment-at-flipkart
Continuous deployment-at-flipkartContinuous deployment-at-flipkart
Continuous deployment-at-flipkart
 
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)
 
Service Configuration Management for Rapid Growth
Service Configuration Management for Rapid GrowthService Configuration Management for Rapid Growth
Service Configuration Management for Rapid Growth
 
Mobile Network Performance Testing
Mobile Network Performance TestingMobile Network Performance Testing
Mobile Network Performance Testing
 
LDS salesforce saturday
LDS  salesforce saturdayLDS  salesforce saturday
LDS salesforce saturday
 
Continuous Testing in the Agile Age
Continuous Testing in the Agile AgeContinuous Testing in the Agile Age
Continuous Testing in the Agile Age
 
Getting Started with PaaS
Getting Started with PaaSGetting Started with PaaS
Getting Started with PaaS
 
An Ops Primer to Productionalizing Datameer
An Ops Primer to Productionalizing DatameerAn Ops Primer to Productionalizing Datameer
An Ops Primer to Productionalizing Datameer
 
10 Typical Java Problems in the Wild
10 Typical Java Problems in the Wild10 Typical Java Problems in the Wild
10 Typical Java Problems in the Wild
 
Test at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local TestingTest at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local Testing
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
How Atlassian made the switch to DVCS
How Atlassian made the switch to DVCSHow Atlassian made the switch to DVCS
How Atlassian made the switch to DVCS
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Reark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaReark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJava
 
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
 
Creating airplane mode proof (Xamarin) applications
Creating airplane mode proof (Xamarin) applicationsCreating airplane mode proof (Xamarin) applications
Creating airplane mode proof (Xamarin) applications
 
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPTMark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
BlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance ReportingBlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance Reporting
 

Semelhante a PhoneGap Day EU 2017: Hybrid Ember Apps

Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
FITC
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
Brian LeRoux
 

Semelhante a PhoneGap Day EU 2017: Hybrid Ember Apps (20)

Ember Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberEmber Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with Ember
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Google ART (Android RunTime)
Google ART (Android RunTime)Google ART (Android RunTime)
Google ART (Android RunTime)
 
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.jsWeb Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
 
Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...
 
JAX 2014 - The PaaS to a better IT architecture.
JAX 2014 - The PaaS to a better IT architecture.JAX 2014 - The PaaS to a better IT architecture.
JAX 2014 - The PaaS to a better IT architecture.
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
 
Chapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesChapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side Technologies
 
Angular Ivy- An Overview
Angular Ivy- An OverviewAngular Ivy- An Overview
Angular Ivy- An Overview
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
GoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applicationsGoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applications
 
Java Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreJava Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,Coimbatore
 
Android Lollipop
Android LollipopAndroid Lollipop
Android Lollipop
 

Mais de Alex Blom

Mais de Alex Blom (9)

PG Day Us: Animations for Web & Hybrid
PG Day Us: Animations for Web & HybridPG Day Us: Animations for Web & Hybrid
PG Day Us: Animations for Web & Hybrid
 
Browser Internals for JS Devs: WebU Toronto 2016 by Alex Blom
Browser Internals for JS Devs: WebU Toronto 2016 by Alex BlomBrowser Internals for JS Devs: WebU Toronto 2016 by Alex Blom
Browser Internals for JS Devs: WebU Toronto 2016 by Alex Blom
 
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps TipsPhonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
 
Building Browser Extensions with Ember
Building Browser Extensions with EmberBuilding Browser Extensions with Ember
Building Browser Extensions with Ember
 
Build email apps with morse.io
Build email apps with morse.ioBuild email apps with morse.io
Build email apps with morse.io
 
Innovation Growth Strategies for Small Business
Innovation Growth Strategies for Small BusinessInnovation Growth Strategies for Small Business
Innovation Growth Strategies for Small Business
 
Freelance Camp Toronto: How to sell to Enterprise by Dr Cindy Gordon
Freelance Camp Toronto: How to sell to Enterprise by Dr Cindy GordonFreelance Camp Toronto: How to sell to Enterprise by Dr Cindy Gordon
Freelance Camp Toronto: How to sell to Enterprise by Dr Cindy Gordon
 
Freelance Camp Toronto: Social is not new and the 7 biggest social mistakes
Freelance Camp Toronto: Social is not new and the 7 biggest social mistakesFreelance Camp Toronto: Social is not new and the 7 biggest social mistakes
Freelance Camp Toronto: Social is not new and the 7 biggest social mistakes
 
Ryerson 6th August
Ryerson 6th AugustRyerson 6th August
Ryerson 6th August
 

Último

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Último (20)

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 

PhoneGap Day EU 2017: Hybrid Ember Apps

Notas do Editor

  1. basic structure; mention pods; config; app/; actions; addons - you will see /w ember-cordova; testing - cli or localhost;