SlideShare a Scribd company logo
1 of 40
ALL ABOUT THAT
reactive
UI Performance in Meteor
Paul van Zyl
CTO at Nona Creative,
@pushplaybang,
pushplaybang on GitHub
paul@nonacreative.com
Origins
• First Hybrid attempts where underwhelming to say the
least.
• Wanted to understand performance throughout the meteor
stack. The UI seemed to be one of the largest challenges
• Wanted to use the default view layer, as a) I’m not
experienced enough with React / Angular2 and b) these
both should perform better
• Pushing performance with Blaze would allow me to find its
limits and compare when moving to react etc.
What we’ll cover
• Reactivity and Connected Client Apps
• Why Meteor
• What is Performance?
• UI Performance Tips for in Meteor
• Mobile Patterns for Performance
Reactivity, &
connected client apps
In computing, reactive programming is a
programming paradigm orientated around
data flows and the propagation of change.
-wikipedia
Meeting User Expectations
Reacting to user input, and the input of other
connected users is an essential component of SPA’s
(single page applications), connected clients and
social or collaborative apps, and how we expect them
to work, and respond to us.
Connected Clients Gone Wild
• Gmail automatically replenishing your inbox
• Trello Shows live changes across users and devices
• Google docs collaborative writing and editing
• Facebook twitter and Instagram updating new posts
and notifications.
• Whats app logs you into its web client after scanning
a QR code with your phone.
Typical UI Interactions
• instant user feedback (think the like button on any
social network)
• Notifications, comments & newsfeed updates
• live validation of forms against the server (this
username doesn’t / does exist)
• Real time chat
UI Frameworks
Not Just a UI Problem
• Requires a new kind of approach
• There are tools libraries and frameworks across
popular web languages to support this. (action-
cable in rails5, vert for the JVM, phoenix on erlang
VM, tornado for python)
• And a number of hosted services including pusher,
pubnub, firebase etc.
Why Meteor
The Business Case
• MIT Licensed and Vendor Benefits
• Backed by the smartest money in tech (Andreessen
Horowitz, Matrix Partners, Trinity Ventures, Y
Combinator), with at $31m in series A & B funding.
• All Star Team Behind the technology.
• Professional Support and an end-to-end vision for
cross platform app built with JS
• Huge, active community
For Developers
• Easy to Start With & Easy to Learn
• Isomorphic - Javascript on the client and the server.
• Supports ES6 out the box
• Ever increasing its integration with the somewhat fragmented
greater JS eco-system
• Large Friendly Community, with a huge selection of packages
and pre-built modules
• One of the most advanced build tools, targeting multiple
platforms. (Web, Android & iOS).
Built for a New Paradigm
• Full Stack Reactivity
• Optimistic UI
• Client Side Cache
• Real-Time by default with WebSockets
• First Class support for Angular and React
• Obscures the complexities of futures and fibres with a very
approachable synchronous API
• transparent reactivity with tracker
Challenges
• Obscuring complexity gives us a “magic box” and
removes some control
• not everything needs to be real-time or reactive
• Some lock-in / tight coupling
• Its sometimes challenging coming from other
platforms
The Future
• Native NPM support
• ES6 modules for controlling load order and
managing dependancies
• Extensive Built in Testing Framework
• Meteor Guide is centralising common patterns and
best practices
• Apollo will liberate us with GraphQL
time for code
a common approach to reactive UI’s with Blaze
https://github.com/Pushplaybang/pomodoro-timer-prototype
What is Performance
Most of the time we’re
asking “how fast is it?”
• How fast does it load?
• How fast is data Retrieved?
• How fast are things calculated, processed or
parsed?
• How fast are things rendered or removed?
How fast does it feel?
• Is the experience fluid and smooth?
• Does the interface respond to the user when they
engage it?
• How appropriate is the response?
Building Performance
Orientated UI’s in Meteor
What We Get Free
• Minified JS and CSS
• Templates in JS with Blaze
• Gzip + local storage, and caching with appcache
• lightening fast data transfer over web sockets
Measuring Stuff
• Kadina Debug to understand the whole system.
• Chrome Developer Tools
• Network tab for “how fast it loads”
• Timeline (and FPS specifically) will start to show
you “how fast it feels”, and whats “in play”.
Simplify first
• Move as much processing onto the server
• consider what really needs to be reactive
• sacrifice load time for execution time
• know your weapons & use vanilla JS
• Don’t guess, measure!
Animation
• Tasteful UI animation is part of the modern user
expectation
• Animation adds fluidity to the interface
• Only Animate opacity and 3d transforms
• Aiming for 60fps means an execution time of
16.666666667ms per frame.
Going Mobile
• Consider the constraints of underpowered devices
• Animate carefully, and consider physical models of
interaction
• patch the webview with crossWalk for Android (iOS
gets WKWebview by default in 1.3)
• Use strategic patterns to manage activity.
• Test Everything Constantly
How fat is too fat?
• WAIT! Wont Xwalk and WKwebview bloat the app?
• https://gist.github.com/Pushplaybang/21780c8d535
92f082b59
Mobile UI Patterns
We’re not the first people to try figure this out.
Mobile UI Patterns
• Don’t do it All Together
• Pre-Render Templates
• Re-use and patch cached data
• Carefully control loading of data and assets
• Pre-Load and render for quick switching
• lock down unnecessary interactions
• Don’t always tear down cached data
Blaze Specific
• Don’t always do reactive, use events for performance sensitive
interactions over reactive computations
• Use Native events
• Don’t just grab packages - you don’t always need the whole
jungle.
• cache everything from the DOM, and avoid expensive
calculations
• use native JS for _uihook animations.
• Pre-render where ever possible, and re-use data.
Delaying Activity
• use setTimeout or TransitionEnd if you can.
• setTimeout is 60% slower than using the transition
end event.
Micro Optimisations
That Mattered To Me
getElementById
Classname vs Style
Offset vs getBoundingRect
A few more I didn’t get
graphs for.
• requestAnimationFrame
• scope & ‘this’
• cache ‘el.style’
• if you have to loop, you a reversed decrementing for
loop.
• Bind close to the element
What we didn’t cover
• In Depth look at developer tools
• optimisations throughout the stack
• Rendering optimisations (Layout thrashing,
continuous paint, composite layers etc)
• What affect angular 2 or React might have
General Good Practice
• Optimise for the most common use case
• limit work to the task at hand
• Solve, Measure, Optimise - repeat
• Acknowledge and accept constraints & trade-offs
• Consider the whole system, experience and needs.

More Related Content

What's hot

DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the thingsMat Mannion
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15GreeceJS
 
React. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey KolodnitskiyReact. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey KolodnitskiyValeriia Maliarenko
 
Devops at Startup Weekend BXL
Devops at Startup Weekend BXLDevops at Startup Weekend BXL
Devops at Startup Weekend BXLKris Buytaert
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015Stuart Harris
 
STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)Mike Subelsky
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatAmbassador Labs
 
Evolve 2017 - Vegas - Devops, Docker and Security
Evolve 2017 - Vegas - Devops, Docker and Security Evolve 2017 - Vegas - Devops, Docker and Security
Evolve 2017 - Vegas - Devops, Docker and Security John Willis
 
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...VMware Tanzu
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSMurughan Palaniachari
 
React for .net developers
React for .net developersReact for .net developers
React for .net developersmacsdickinson
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at FlickrJohn Allspaw
 
Agile experiments in Machine Learning with F#
Agile experiments in Machine Learning with F#Agile experiments in Machine Learning with F#
Agile experiments in Machine Learning with F#J On The Beach
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Daniel Feist
 

What's hot (20)

DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
 
React. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey KolodnitskiyReact. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey Kolodnitskiy
 
ChatOps in Action
ChatOps in ActionChatOps in Action
ChatOps in Action
 
Devops at Startup Weekend BXL
Devops at Startup Weekend BXLDevops at Startup Weekend BXL
Devops at Startup Weekend BXL
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
Agile scrum with Microsoft VSTS
Agile scrum with Microsoft VSTSAgile scrum with Microsoft VSTS
Agile scrum with Microsoft VSTS
 
React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015
 
STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
 
Evolve 2017 - Vegas - Devops, Docker and Security
Evolve 2017 - Vegas - Devops, Docker and Security Evolve 2017 - Vegas - Devops, Docker and Security
Evolve 2017 - Vegas - Devops, Docker and Security
 
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTS
 
React. Flux. Redux
React. Flux. ReduxReact. Flux. Redux
React. Flux. Redux
 
React for .net developers
React for .net developersReact for .net developers
React for .net developers
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
 
Migrating big data
Migrating big dataMigrating big data
Migrating big data
 
Agile experiments in Machine Learning with F#
Agile experiments in Machine Learning with F#Agile experiments in Machine Learning with F#
Agile experiments in Machine Learning with F#
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?
 
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
 

Viewers also liked

敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu
敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu 敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu
敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu William Tai
 
프로젝트 소울
프로젝트 소울프로젝트 소울
프로젝트 소울소영 유
 
Tugas 1 multimedia kelompok 2(2)
Tugas 1 multimedia kelompok 2(2)Tugas 1 multimedia kelompok 2(2)
Tugas 1 multimedia kelompok 2(2)lydialolyzi
 
западная европа
западная европазападная европа
западная европаValentina150855
 
Sistemas tecnológicos 2
Sistemas tecnológicos 2Sistemas tecnológicos 2
Sistemas tecnológicos 2Marcos Paredes
 
Carol Vernalsis
Carol VernalsisCarol Vernalsis
Carol Vernalsisnigeldune
 
святые покровители санкт петербурга
святые покровители санкт петербургасвятые покровители санкт петербурга
святые покровители санкт петербургаValentina150855
 
Goodyear Digital Strategy
Goodyear Digital StrategyGoodyear Digital Strategy
Goodyear Digital StrategyPollicen
 
20160616 AHA sharing
20160616 AHA sharing20160616 AHA sharing
20160616 AHA sharingWilliam Tai
 

Viewers also liked (14)

敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu
敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu 敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu
敏捷保健室與敏捷小護士 - 2015 Agile Tour Hsinchu
 
Hormonas
Hormonas Hormonas
Hormonas
 
Brașov
BrașovBrașov
Brașov
 
프로젝트 소울
프로젝트 소울프로젝트 소울
프로젝트 소울
 
Tugas 1 multimedia kelompok 2(2)
Tugas 1 multimedia kelompok 2(2)Tugas 1 multimedia kelompok 2(2)
Tugas 1 multimedia kelompok 2(2)
 
Resume Naveed Waraich
Resume Naveed WaraichResume Naveed Waraich
Resume Naveed Waraich
 
западная европа
западная европазападная европа
западная европа
 
Planta de Los Dioses – Albert Hofmann
Planta de Los Dioses – Albert HofmannPlanta de Los Dioses – Albert Hofmann
Planta de Los Dioses – Albert Hofmann
 
Sistemas tecnológicos 2
Sistemas tecnológicos 2Sistemas tecnológicos 2
Sistemas tecnológicos 2
 
Carol Vernalsis
Carol VernalsisCarol Vernalsis
Carol Vernalsis
 
AXIOLOGIA
AXIOLOGIAAXIOLOGIA
AXIOLOGIA
 
святые покровители санкт петербурга
святые покровители санкт петербургасвятые покровители санкт петербурга
святые покровители санкт петербурга
 
Goodyear Digital Strategy
Goodyear Digital StrategyGoodyear Digital Strategy
Goodyear Digital Strategy
 
20160616 AHA sharing
20160616 AHA sharing20160616 AHA sharing
20160616 AHA sharing
 

Similar to All about that reactive ui

Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with reduxMike Melusky
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Jeremy Likness
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best PracticesPavel Mička
 
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps_Fest
 
Development Processes and Tooling
Development Processes and ToolingDevelopment Processes and Tooling
Development Processes and ToolingBora Bilgin
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesTeamstudio
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for youAmbientia
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?Eduard Tomàs
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...Heiko Voigt
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
Full stack development using javascript what and why - ajay chandravadiya
Full stack development using javascript   what and why - ajay chandravadiyaFull stack development using javascript   what and why - ajay chandravadiya
Full stack development using javascript what and why - ajay chandravadiyaajayrcgmail
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayBizTalk360
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
Modernizing Applications with Microservices
Modernizing Applications with MicroservicesModernizing Applications with Microservices
Modernizing Applications with MicroservicesMarkus Eisele
 

Similar to All about that reactive ui (20)

Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
 
Development Processes and Tooling
Development Processes and ToolingDevelopment Processes and Tooling
Development Processes and Tooling
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
2014 Picking a Platform by Anand Kulkarni
2014 Picking a Platform by Anand Kulkarni2014 Picking a Platform by Anand Kulkarni
2014 Picking a Platform by Anand Kulkarni
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Full stack development using javascript what and why - ajay chandravadiya
Full stack development using javascript   what and why - ajay chandravadiyaFull stack development using javascript   what and why - ajay chandravadiya
Full stack development using javascript what and why - ajay chandravadiya
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration Monday
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Modernizing Applications with Microservices
Modernizing Applications with MicroservicesModernizing Applications with Microservices
Modernizing Applications with Microservices
 
Meteor meetup
Meteor meetupMeteor meetup
Meteor meetup
 

Recently uploaded

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

All about that reactive ui

  • 1. ALL ABOUT THAT reactive UI Performance in Meteor
  • 2. Paul van Zyl CTO at Nona Creative, @pushplaybang, pushplaybang on GitHub paul@nonacreative.com
  • 3. Origins • First Hybrid attempts where underwhelming to say the least. • Wanted to understand performance throughout the meteor stack. The UI seemed to be one of the largest challenges • Wanted to use the default view layer, as a) I’m not experienced enough with React / Angular2 and b) these both should perform better • Pushing performance with Blaze would allow me to find its limits and compare when moving to react etc.
  • 4. What we’ll cover • Reactivity and Connected Client Apps • Why Meteor • What is Performance? • UI Performance Tips for in Meteor • Mobile Patterns for Performance
  • 6. In computing, reactive programming is a programming paradigm orientated around data flows and the propagation of change. -wikipedia
  • 7. Meeting User Expectations Reacting to user input, and the input of other connected users is an essential component of SPA’s (single page applications), connected clients and social or collaborative apps, and how we expect them to work, and respond to us.
  • 8. Connected Clients Gone Wild • Gmail automatically replenishing your inbox • Trello Shows live changes across users and devices • Google docs collaborative writing and editing • Facebook twitter and Instagram updating new posts and notifications. • Whats app logs you into its web client after scanning a QR code with your phone.
  • 9. Typical UI Interactions • instant user feedback (think the like button on any social network) • Notifications, comments & newsfeed updates • live validation of forms against the server (this username doesn’t / does exist) • Real time chat
  • 11. Not Just a UI Problem • Requires a new kind of approach • There are tools libraries and frameworks across popular web languages to support this. (action- cable in rails5, vert for the JVM, phoenix on erlang VM, tornado for python) • And a number of hosted services including pusher, pubnub, firebase etc.
  • 13. The Business Case • MIT Licensed and Vendor Benefits • Backed by the smartest money in tech (Andreessen Horowitz, Matrix Partners, Trinity Ventures, Y Combinator), with at $31m in series A & B funding. • All Star Team Behind the technology. • Professional Support and an end-to-end vision for cross platform app built with JS • Huge, active community
  • 14. For Developers • Easy to Start With & Easy to Learn • Isomorphic - Javascript on the client and the server. • Supports ES6 out the box • Ever increasing its integration with the somewhat fragmented greater JS eco-system • Large Friendly Community, with a huge selection of packages and pre-built modules • One of the most advanced build tools, targeting multiple platforms. (Web, Android & iOS).
  • 15. Built for a New Paradigm • Full Stack Reactivity • Optimistic UI • Client Side Cache • Real-Time by default with WebSockets • First Class support for Angular and React • Obscures the complexities of futures and fibres with a very approachable synchronous API • transparent reactivity with tracker
  • 16. Challenges • Obscuring complexity gives us a “magic box” and removes some control • not everything needs to be real-time or reactive • Some lock-in / tight coupling • Its sometimes challenging coming from other platforms
  • 17. The Future • Native NPM support • ES6 modules for controlling load order and managing dependancies • Extensive Built in Testing Framework • Meteor Guide is centralising common patterns and best practices • Apollo will liberate us with GraphQL
  • 18. time for code a common approach to reactive UI’s with Blaze https://github.com/Pushplaybang/pomodoro-timer-prototype
  • 20. Most of the time we’re asking “how fast is it?” • How fast does it load? • How fast is data Retrieved? • How fast are things calculated, processed or parsed? • How fast are things rendered or removed?
  • 21. How fast does it feel? • Is the experience fluid and smooth? • Does the interface respond to the user when they engage it? • How appropriate is the response?
  • 23. What We Get Free • Minified JS and CSS • Templates in JS with Blaze • Gzip + local storage, and caching with appcache • lightening fast data transfer over web sockets
  • 24. Measuring Stuff • Kadina Debug to understand the whole system. • Chrome Developer Tools • Network tab for “how fast it loads” • Timeline (and FPS specifically) will start to show you “how fast it feels”, and whats “in play”.
  • 25. Simplify first • Move as much processing onto the server • consider what really needs to be reactive • sacrifice load time for execution time • know your weapons & use vanilla JS • Don’t guess, measure!
  • 26. Animation • Tasteful UI animation is part of the modern user expectation • Animation adds fluidity to the interface • Only Animate opacity and 3d transforms • Aiming for 60fps means an execution time of 16.666666667ms per frame.
  • 27. Going Mobile • Consider the constraints of underpowered devices • Animate carefully, and consider physical models of interaction • patch the webview with crossWalk for Android (iOS gets WKWebview by default in 1.3) • Use strategic patterns to manage activity. • Test Everything Constantly
  • 28. How fat is too fat? • WAIT! Wont Xwalk and WKwebview bloat the app? • https://gist.github.com/Pushplaybang/21780c8d535 92f082b59
  • 29. Mobile UI Patterns We’re not the first people to try figure this out.
  • 30.
  • 31. Mobile UI Patterns • Don’t do it All Together • Pre-Render Templates • Re-use and patch cached data • Carefully control loading of data and assets • Pre-Load and render for quick switching • lock down unnecessary interactions • Don’t always tear down cached data
  • 32. Blaze Specific • Don’t always do reactive, use events for performance sensitive interactions over reactive computations • Use Native events • Don’t just grab packages - you don’t always need the whole jungle. • cache everything from the DOM, and avoid expensive calculations • use native JS for _uihook animations. • Pre-render where ever possible, and re-use data.
  • 33. Delaying Activity • use setTimeout or TransitionEnd if you can. • setTimeout is 60% slower than using the transition end event.
  • 38. A few more I didn’t get graphs for. • requestAnimationFrame • scope & ‘this’ • cache ‘el.style’ • if you have to loop, you a reversed decrementing for loop. • Bind close to the element
  • 39. What we didn’t cover • In Depth look at developer tools • optimisations throughout the stack • Rendering optimisations (Layout thrashing, continuous paint, composite layers etc) • What affect angular 2 or React might have
  • 40. General Good Practice • Optimise for the most common use case • limit work to the task at hand • Solve, Measure, Optimise - repeat • Acknowledge and accept constraints & trade-offs • Consider the whole system, experience and needs.