Finding the sweet spot - blending the best of native and web

38
Finding the sweet spot - blending the best of native and web Shawn Jansepar @shawnjan8

Transcript of Finding the sweet spot - blending the best of native and web

Page 1: Finding the sweet spot - blending the best of native and web

Finding the sweet spot - blending the best of

native 📱 and web 🏄

Shawn Jansepar@shawnjan8

Page 2: Finding the sweet spot - blending the best of native and web
Page 3: Finding the sweet spot - blending the best of native and web
Page 4: Finding the sweet spot - blending the best of native and web

"The biggest mistake that we made, as a company, is betting too much on HTML5 as opposed to native…" -

Mark Zuckerberg

Page 5: Finding the sweet spot - blending the best of native and web

“For areas within the app where we anticipate making changes more often, we will continue to utilize HTML5

code, as we can push updates server side without requiring people to download a new version of the app”

- Jonathan Dann (Facebook Engineer)

Page 6: Finding the sweet spot - blending the best of native and web

"The biggest mistake that we made, as a company, is betting too much on HTML5 as opposed to native a

particular technology rather then focusing on the experience…" - Mark Zuckerberg

Page 7: Finding the sweet spot - blending the best of native and web

Why Web Interfaces?

• Runs on every modern operating system

• Deploy without app update

Why Native Interfaces?• Performance.

Page 8: Finding the sweet spot - blending the best of native and web

Why choose?

Page 9: Finding the sweet spot - blending the best of native and web

What matters is the experience, not the technology.

Page 10: Finding the sweet spot - blending the best of native and web

+

Page 11: Finding the sweet spot - blending the best of native and web
Page 12: Finding the sweet spot - blending the best of native and web

A “Write once, run everywhere” approach

Page 13: Finding the sweet spot - blending the best of native and web

A “Write once, run everywhere” approach

Page 14: Finding the sweet spot - blending the best of native and web

Credit to Allen Pike, image from http://www.allenpike.com/2011/providing-joy-at-60-fps/

Page 15: Finding the sweet spot - blending the best of native and web

We need a “Maybe write once maybe run-everywhere it really depends on the

feature” approach

Page 16: Finding the sweet spot - blending the best of native and web

What was our “sweet spot”?

Page 17: Finding the sweet spot - blending the best of native and web

The native bits 📱

Page 18: Finding the sweet spot - blending the best of native and web
Page 19: Finding the sweet spot - blending the best of native and web

Navigation

Page 20: Finding the sweet spot - blending the best of native and web

Navigation

Page 21: Finding the sweet spot - blending the best of native and web

Navigation

Page 22: Finding the sweet spot - blending the best of native and web

Bidding Screen

Page 23: Finding the sweet spot - blending the best of native and web

¯\_( )_/¯

Page 24: Finding the sweet spot - blending the best of native and web

The web bits 🏄

Page 25: Finding the sweet spot - blending the best of native and web

Building “app-aware” responsive websites• Take “progressive enhancement” to the

next level

• Detecting the “app” context in three places:

• “app” class in CSS

• isRunningInApp method in JS

• “ App” appended to user agent for server-side logic

Page 26: Finding the sweet spot - blending the best of native and web
Page 27: Finding the sweet spot - blending the best of native and web
Page 28: Finding the sweet spot - blending the best of native and web

20% Native, 80% Web

Page 29: Finding the sweet spot - blending the best of native and web

Why Web Interfaces?

• Runs on every modern operating system

• Deploy without app update

Why Native Interfaces?

• Performance.

Page 30: Finding the sweet spot - blending the best of native and web

Web + Native

• Runs on every modern operating system

• Deploy without app update

• Performant

Page 31: Finding the sweet spot - blending the best of native and web

In a 🌰, choose the appropriate technology on a feature by feature basis

Page 32: Finding the sweet spot - blending the best of native and web

How to build apps using a mix of both

Page 33: Finding the sweet spot - blending the best of native and web

Embedded PhoneGap

http://docs.phonegap.com/develop/embed-webview/

Page 34: Finding the sweet spot - blending the best of native and web

Credit to Holly Schinsky, image from http://phonegap.com/blog/2015/03/12/mobile-choices-post1/

Page 35: Finding the sweet spot - blending the best of native and web

Astro - the “Native” Hybrid SDK built on top of Cordova

http://astro.mobify.com/

Page 36: Finding the sweet spot - blending the best of native and web

Top 3 WebView Performance Tips

• Remove transform: translate3d in Android 4.4.2 (or use Crosswalk)

• Change WebView deceleration rate to UIScrollViewDecelerationRateNormal

• Use fast click, not only to make clicks faster, but also to fix a bug in iOS 8.4.1 that causes slow taps to not navigate

Page 37: Finding the sweet spot - blending the best of native and web

Find the sweet spot in your app

Page 38: Finding the sweet spot - blending the best of native and web

@shawnjan8

http://astro.mobify.com/

Questions?