hybrid mobile apps

93
Abraham Barrera Desarrollador @abraham_barrera JavascriptCore & Hybrid Mobile Apps

Upload: abraham-barrera

Post on 09-May-2015

355 views

Category:

Technology


2 download

DESCRIPTION

Develop hybrid applications, with JavascriptCore

TRANSCRIPT

Page 1: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

JavascriptCore & Hybrid Mobile Apps

Page 2: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

Hybrid Mobile Apps & JavascriptCore

Page 3: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

SucksAndroid

Page 4: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

Hybrid Applications

Page 5: Hybrid mobile apps

OX:STRONG & MEEK

Page 6: Hybrid mobile apps

A designer desk

Page 7: Hybrid mobile apps

Developer Desk

Page 8: Hybrid mobile apps

People hates Web

Page 9: Hybrid mobile apps

People Loves Web

Page 10: Hybrid mobile apps

Some people hates Objective-C

Page 11: Hybrid mobile apps

Native Web

Merge two worlds

Page 12: Hybrid mobile apps

Native Web

Tech Stack

Objective-C

Java

C++

C#

Page 13: Hybrid mobile apps

Native Web

Tech Stack

Objective-C

Java

C++

C#

Javascript

HTML5

CSS3

Page 14: Hybrid mobile apps

Native Web

Advantages

Device Resources

Stability

Big Storage Support

Etc... A Lot of great things

Cool Transitions / Performance

Page 15: Hybrid mobile apps

Native Web

Advantages

Device Resources

Stability

Big Storage Support

CSS Support

Easy Prototyping

Cross Platform

Etc... A Lot of great things

Faster to update content

Cool Transitions / Performance

Page 16: Hybrid mobile apps

Native Web

Advantages

Device Resources

Stability

Big Storage Support

CSS Support

Easy Prototyping

Cross Platform

Etc... A Lot of great things

Faster to update content

Cool Transitions / Performance

Page 17: Hybrid mobile apps

How long time?

Page 18: Hybrid mobile apps

“Hybrid applications.. We recomend”

Iphone OS developer guide - 2008

Long

Page 19: Hybrid mobile apps

http://code.google.com/p/iphone-google-maps-component/

Great sample !

Page 20: Hybrid mobile apps

why don't we listened?

Page 21: Hybrid mobile apps

Our first Applications

Page 22: Hybrid mobile apps

Hybrid Applications

Why?

Abraham BarreraDesarrollador@abraham_barrera

Page 23: Hybrid mobile apps

Our Motivation

Page 24: Hybrid mobile apps

A Cool Design

Page 25: Hybrid mobile apps

A Cool Design

Page 26: Hybrid mobile apps

A Cool Design

Page 27: Hybrid mobile apps

Yes We're Hackers, We can

Page 28: Hybrid mobile apps

Or not :(

Page 29: Hybrid mobile apps

We're 3

Polyglot

Page 30: Hybrid mobile apps

We're 3

PolyglotiOS

Page 31: Hybrid mobile apps

We're 3

PolyglotiOS

Coolest Designer

We're a hybrid Team

Page 32: Hybrid mobile apps

Decision

Make an embed

web

Best of both

Page 33: Hybrid mobile apps

Embed web content

Hybrid Applications

Embed web Applications*

Page 34: Hybrid mobile apps

Embed web content

Hybrid Applications

Embed web Applications

Native Interpreter

Bridge

Page 35: Hybrid mobile apps

Embed web content

Hybrid Applications

Embed web Applications

Native Interpreter

Bridge

Phonegap JavascriptCore / V8

Page 36: Hybrid mobile apps

Embed web content

Hybrid Applications

Embed web Applications

Native Interpreter

Bridge

Phonegap JavascriptCore / V8

Page 37: Hybrid mobile apps

Hybrid Applications

Page 38: Hybrid mobile apps

Hybrid Applications

Page 39: Hybrid mobile apps

Hybrid Applications

Page 40: Hybrid mobile apps

Hybrid Applications

Page 41: Hybrid mobile apps

Embed Web Applications

1. Our Case

Page 42: Hybrid mobile apps

Native Bridge

First Step

Page 43: Hybrid mobile apps

Native Bridge

Social APIS

Page 44: Hybrid mobile apps

Native Bridge

Push Notifications

Page 45: Hybrid mobile apps

Native Bridge

Comment Composser

Page 46: Hybrid mobile apps

Phonegap Why not?

Page 47: Hybrid mobile apps

Phonegap Why not?

Poor Social Apis, and a lot of things

Page 48: Hybrid mobile apps

Native Bridge iOS

Page 49: Hybrid mobile apps

WebView Native API

Native Bridge iOS

document.location =

rhyboo://method?params

Page 50: Hybrid mobile apps

WebView Native API

Native Bridge iOS

document.location =

rhyboo://method?params

Page 51: Hybrid mobile apps

See it in Action

https://github.com/abrahambarrera/dynlang_june13

Page 52: Hybrid mobile apps

Native Bridge Android

Page 53: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

SucksAndroid

Page 54: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

SucksAndroid

The only good thing

Page 55: Hybrid mobile apps

WebView Native API

myBridge.myMethod(params)

Native Bridge Android

Page 56: Hybrid mobile apps

See it in Action

https://github.com/abrahambarrera/dynlang_june13

Page 57: Hybrid mobile apps

Build a web Application

Second step

Page 58: Hybrid mobile apps

¿ Frameworks ?

Time to Market

Page 59: Hybrid mobile apps

And others

Page 60: Hybrid mobile apps

First Conslusion

Page 61: Hybrid mobile apps

JQMobile(for Desktop browsers)

A lot of Code

Page 62: Hybrid mobile apps

JQMobile(for Desktop browsers)

Large size

Page 63: Hybrid mobile apps

JQMobile(for Desktop browsers)

Many fallbacks

Page 64: Hybrid mobile apps

Android Webview(slow, no websocket)

Very Slow

Page 65: Hybrid mobile apps

Android Webview(slow, no websocket)

deaccelerated transitions

Page 66: Hybrid mobile apps

First Tip

Page 67: Hybrid mobile apps

use a lightweight framework

Page 68: Hybrid mobile apps

use a lightweight framework

Page 69: Hybrid mobile apps

First Big Question

Page 70: Hybrid mobile apps

How did it Facebook?

Page 71: Hybrid mobile apps

Decompile: Facebok iOS and Android app

Page 72: Hybrid mobile apps

They use the best They use the best of both worldsof both worlds

Page 73: Hybrid mobile apps

Embed web content

Embed web Applications*

Page 74: Hybrid mobile apps

Bridge

Page 75: Hybrid mobile apps

A lot of pictures(why not CSS3)

Page 76: Hybrid mobile apps

Second Conclusion

Page 77: Hybrid mobile apps

CSS3

Don't use Box-Shadow

Page 78: Hybrid mobile apps

CSS3

Don't use alpha

Page 79: Hybrid mobile apps

CSS3

Don't use Border Radius

Page 80: Hybrid mobile apps

Second Tip

Page 81: Hybrid mobile apps

CSS3

Use transform and translate

Page 82: Hybrid mobile apps

Webviews

Aren't browsers

Page 83: Hybrid mobile apps

Partial Webviews

Use a few webviews

Page 84: Hybrid mobile apps

Embed Web Content

2. The other way

Page 85: Hybrid mobile apps

HTML Templates

You can use Mustache, JQTempl

Page 86: Hybrid mobile apps

Page Transitions

Managed natively

Page 87: Hybrid mobile apps

HTTP / Websocket

Managed natively

Page 88: Hybrid mobile apps

REST API Websocket Web Content

DEVICE PLATFORM

WEBVIEW

Page 89: Hybrid mobile apps

REST API Websocket Web Content

DEVICE PLATFORM

WEBVIEW

Webview is Slow

Page 90: Hybrid mobile apps

REST API Websocket Web Content

DEVICE PLATFORM

WEBVIEW

Webview is a bottleneck

Page 91: Hybrid mobile apps

REST API Websocket Web Content

DEVICE PLATFORM

WEBVIEW

Advantage of native

Page 92: Hybrid mobile apps

See it in Action

https://github.com/abrahambarrera/dynlang_june13

Page 93: Hybrid mobile apps

Abraham BarreraDesarrollador@abraham_barrera

Thanks !

Questions?