html 5 vs. native mobile applications

51
HTML 5 vs. Native Sasha Aickin Search Team Lead, Redfin

Upload: glennkelman

Post on 21-May-2015

3.194 views

Category:

Technology


0 download

DESCRIPTION

The lead developer for Redfin's search application leads an engineer-to-engineer talk on

TRANSCRIPT

Page 1: HTML 5 vs. Native Mobile Applications

HTML 5 vs. Native

Sasha Aickin Search Team Lead, Redfin

Page 2: HTML 5 vs. Native Mobile Applications

The time: Yesterday

The Place: Moscone West

Page 3: HTML 5 vs. Native Mobile Applications

Um, WTF?

We often cast technology platform wars as "religious", but

it's rare that we get actual monks involved.

Page 4: HTML 5 vs. Native Mobile Applications

Who doesn't love a little religious war?

And why are mommy and daddy fighting?

So...

How did we get to this place?

What should we as developers do about it?

Page 5: HTML 5 vs. Native Mobile Applications

Who doesn't love a little religious war?

And why are Google and Apple fighting?

So...

How did we get to this place?

What should we as developers do about it?

Page 6: HTML 5 vs. Native Mobile Applications

But first... 

and the lessons we (should have?) learned

A Brief History of the Mobile Internet

Page 7: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile Internet

Phase one: The Sync-ternet  (1997-2001)

Page 8: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile Internet

Phase one: The Sync-ternet  (1997-2001)

Lesson the First:

Mobile without wireless is just this side of useless.

Page 9: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Two: WAP! (2000-2006)

They promised:

Page 10: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Two: WAP! (2000-2006)

They delivered:

FAIL

Page 11: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Two: WAP! (2000-2006)

Lesson the Second:

Mobile without good user interface is not much better.

Page 12: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Three: the Actual Internet (2007)

Page 13: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Three: the Actual Internet (2007)

"Perhaps it’s playing well in the mainstream press, but here at WWDC, Apple’s “you can write great apps for the iPhone: they’re called ‘web sites’” — message went over like a lead balloon....

– John Gruber, June 2007    WWDC 2007 Keynote Notes

If all you have to offer is a s*** sandwich, just say it. Don’t tell us how lucky we are and that it’s going to taste delicious."

Page 14: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Three: the Actual Internet (2007)

Lesson the Third:

Mobile that's a second-class citizen also does not fly. 

Page 15: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Four: Apps! The Internet without HTML (2008-?)

Page 16: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Four: Apps! The Internet without HTML (2008-?)

Lesson the Fourth:

Users will pay for mobile that works. 

Page 17: HTML 5 vs. Native Mobile Applications

A Brief History of the Mobile InternetPhase Five: HTML5, the revenge of the standard (2009-?)

VS.

Page 18: HTML 5 vs. Native Mobile Applications

SPOILER ALERTHTML5 wins.

Um, eventually.

Page 19: HTML 5 vs. Native Mobile Applications

Case study on the desktop: CoolIrisCoolIris developed a browser plugin over the course of several years which displays images and videos in a 3D wall.

A random guy did a similar thing in HTML5 in a few weeks.

HTML FTW

Page 20: HTML 5 vs. Native Mobile Applications

HTML5 is awesome!

It's a standard.

It's got massively widespread support.

It works on many different devices.

Your developers already know it.

Case closed, right?

Page 21: HTML 5 vs. Native Mobile Applications

Er, no. Eventually is the key here.

The bankruptcy courts of Silicon Valley are littered with the corpses of wireless Internet companies who thought that the wireless Internet was at hand before the technology and market caught up.

So if you have to build a mobile app now:

What should you do?

Try to go HTML5, but first consider four questions.

Page 22: HTML 5 vs. Native Mobile Applications

The first (and easiest) question is:

What will the app do?

Page 23: HTML 5 vs. Native Mobile Applications

There's a lot that can't be done in HTML5.

Running in the background

Accessing media files

Taking video

Taking pictures

Accelerometer

Gyroscope

Vibration

Notifications

Page 24: HTML 5 vs. Native Mobile Applications

But there's a shocking amount that can be:

GPS and Compass

Local SQL Storage

Web App Cache

Vector and bitmap 2D graphics

3D with OpenGL

Touch and gesture recognition

Native video tag

Native audio tag

Page 25: HTML 5 vs. Native Mobile Applications

Functionality Case study: Hand of Greed 

Page 26: HTML 5 vs. Native Mobile Applications

The first question

What will the app do?

If the answer is "something only supported natively", go native.

Otherwise, move on to...

Page 27: HTML 5 vs. Native Mobile Applications

The second (and squirrelliest) question is:

How will the app feel?

Page 28: HTML 5 vs. Native Mobile Applications

Look & Feel

If you want a web app to look like a native app, you have two choices:

1. Use iUI/SproutCore/iWebKit/jqTouch framework and write your app with native-ish controls in HTML/CSS/JavaScript

... and painstakingly fix the bugs and issues and weirdnesses...

... and end up with an app that still doesn't really look or feel like a native app.

Page 29: HTML 5 vs. Native Mobile Applications

Look & Feel

If you want a web app to look like a native app, you have two choices:

2. Give up and realize it was a bad idea to begin with.

Page 30: HTML 5 vs. Native Mobile Applications

The Weirdness of the Web

There are bunch of web conventions that are page-like, not app-like:

Bookmarks

Back Button

Refresh Button

Page Flash

Passed Links

Page 31: HTML 5 vs. Native Mobile Applications

Performance

"Speed kills."

Performance is where abstractions go to die.

Page 32: HTML 5 vs. Native Mobile Applications

Performance case study: Amazon

 

Page 33: HTML 5 vs. Native Mobile Applications

Performance case study: Google Maps 

Page 34: HTML 5 vs. Native Mobile Applications

The second question

How will the app feel?

If you prototype it in HTML5, and you can't stand how it feels, go native.

Otherwise, move on to...

Page 35: HTML 5 vs. Native Mobile Applications

The third (and to some, the most important) question is:

How on earth will you make money?

<TODO: insert clichéd Jerry Maguire reference here>

Page 36: HTML 5 vs. Native Mobile Applications

More money, more problems?

If you are ad-based, HTML vs. native is more or less a toss-up.

Er, unless you're developing on iOS.  You can only send user or device data to:

"an independent advertising service provider whose primary business is serving mobile ads (for example, an advertising service provider owned by or affiliated with a developer or distributor of mobile devices, mobile operating systems or development environments other than Apple would not qualify as independent)"

– Apple iPhone Dev Terms of Service(as quoted on allthingsd.com)

Page 37: HTML 5 vs. Native Mobile Applications

More money, more problems?

If you are ad-based, HTML vs. native is more or less a toss-up.

Er, unless you're developing on iOS.  You can only send user or device data to:

"an independent advertising service provider whose CEO's name does not rhyme with Chmidt"

– my co-worker's re-stating of Apple Terms of Service

Page 38: HTML 5 vs. Native Mobile Applications

More money, more problems?

If you want users to pay you directly, though, you are essentially hosed in the HTML5 world.

Yes, PayPal has a mobile API, as does Google.  Have you ever tried to USE PayPal in a phone browser?  Exactly.

P.S.  This is not PayPal's fault!  All the mobile HTML5 payment experiences kind of suck.

Page 39: HTML 5 vs. Native Mobile Applications

The third question

How on earth will you make money?

If you get paid for the app or in-app purchases, go native.

Otherwise, move on to...

Page 40: HTML 5 vs. Native Mobile Applications

The fourth (and hardest) question is:

How will users find your app?

Page 41: HTML 5 vs. Native Mobile Applications

Google is awesome!

But not really for finding mobile web apps.

Sometimes launching in an app store can feel like being a small fish in a big pond.

But being a mobile webapp just out on the Internet is like being a small protozoa in an infinite universe.

Page 42: HTML 5 vs. Native Mobile Applications

Marketing on the App Stores is Gold

You simply cannot underestimate the power of app store marketing.

LaunchPromoted on App

Store

Page 43: HTML 5 vs. Native Mobile Applications

We need a good directory of HTML5 apps

And it's maybe sorta kinda coming with the Chrome App Store.

But maybe not. :(

Page 44: HTML 5 vs. Native Mobile Applications

The Mom Test

My mom, like many moms, is (a) awesome and (b) not good at technology.

Many, many apps.

My mom has apps installed on her iPhone.  

Page 45: HTML 5 vs. Native Mobile Applications

The Dark Side of the Apple App StoreRemember those bankruptcy courts in Silicon Valley that were full of mobile web companies?

They are now full of iPhone softcore porn app companies, or tethering app companies, or telephony app companies.

Redfin has had nothing but good experiences with Apple, but there is a business risk to depending on all your revenue going through them.

Page 46: HTML 5 vs. Native Mobile Applications

The fourth question

How will users find your app?

If you don't have a solid strategy for getting users to your app (and you can stomach the dangers in Apple's store), go native.

Page 47: HTML 5 vs. Native Mobile Applications

To conclude...

If you aren't doing anything in your app that is outside HTML

AND

If you're OK with the level of performance and feel of HTML

AND

If you don't need to accept payments for or inside your app 

AND

You know how you can get users to your app...

Go HTML5!

Page 48: HTML 5 vs. Native Mobile Applications

Otherwise...

As much as it pains me to say it... 

Go Native.

Page 49: HTML 5 vs. Native Mobile Applications

Moving to the Open Web

In a perfect world, we'd be able to say: "go HTML5 all the way!"

How do we get there?

Page 50: HTML 5 vs. Native Mobile Applications

Here's the plan, see...

1.Add more features to HTML5.  Camera?  Accelerometer?  Gyro?  Yes.  Back to work, Hixie.

2.Make faster devices and faster browsers.  Luckily, Google and Apple are in a death race to do just this.

3.Make payment in HTML5 easy.  No one has solved this or even seems to be working on it.

4.Smooth discovery and installation of web apps.  The Chrome web app store is a step down this path.

Page 51: HTML 5 vs. Native Mobile Applications

That's it

Good luck creating your app, whether it be written in HTML5 or natively, and let's work towards a

more HTML-y world.

Questions?  Praise?  [email protected]