108
studiomagnolia.com Cesare Rocchi Choosing a backend for your mobile application _funkyboy Tuesday, September 11, 12

Choose Backend for Mobile Swipe2012

Embed Size (px)

DESCRIPTION

choosing backend for mobile swipe 2012

Citation preview

Page 1: Choose Backend for Mobile Swipe2012

studiomagnolia.comCesare Rocchi

Choosing a backend for your mobile application

_funkyboy

Tuesday, September 11, 12

Page 2: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Outline•Needs when choosing a backend

• Features

•Overview of different approaches

Tuesday, September 11, 12

Page 3: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who am I?

Tuesday, September 11, 12

Page 4: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

UX designer and developer

Tuesday, September 11, 12

Page 5: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

mnml

Tuesday, September 11, 12

Page 6: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

< is >

Tuesday, September 11, 12

Page 7: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

execution matters

Tuesday, September 11, 12

Page 8: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

lean approach

Tuesday, September 11, 12

Page 9: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who are you?

Tuesday, September 11, 12

Page 10: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Quick version

Tuesday, September 11, 12

Page 11: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

It’s complicated

Tuesday, September 11, 12

Page 12: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Thank you!

Tuesday, September 11, 12

Page 13: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•twitter.com/_funkyboy

•app.net/funkyboy

[email protected]

•http://studiomagnolia.com

Tuesday, September 11, 12

Page 14: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

App Target•Not apps where mobile is “just a view”

•Apps which are inherently mobile

•Personal usage

•Backup or synchronization

Tuesday, September 11, 12

Page 15: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Examples

Tuesday, September 11, 12

Page 16: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

dayoneapp.com

Tuesday, September 11, 12

Page 17: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

culturedcode.com/things

Tuesday, September 11, 12

Page 18: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

iawriter.com

Tuesday, September 11, 12

Page 19: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Questions

Tuesday, September 11, 12

Page 20: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to manage it?

Tuesday, September 11, 12

Page 21: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to manage it?•At which level?

•Am I able to do it?

•Have I time to learn?

• Is it worth it?

Tuesday, September 11, 12

Page 22: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?

Tuesday, September 11, 12

Page 23: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?•Does it match my goals?

•Can I change it if needed?

•What about protocols?

Tuesday, September 11, 12

Page 24: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to pay?

Tuesday, September 11, 12

Page 25: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to pay?

Tuesday, September 11, 12

Page 26: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who is to pay?

Tuesday, September 11, 12

Page 27: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Impact on UX?

Tuesday, September 11, 12

Page 28: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Impact on UX?•Does it break any flow?

•How frequently?

• is it “ok” with that?

Tuesday, September 11, 12

Page 29: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security?

Tuesday, September 11, 12

Page 30: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security?•How data are transferred?

• Is encryption implemented?

Tuesday, September 11, 12

Page 31: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Options• iCloud

•Dropbox

•Parse & co.

•Custom

Tuesday, September 11, 12

Page 32: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What is iCloud?

Tuesday, September 11, 12

Page 33: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

6028 Startown Rd, Maiden, NC

Tuesday, September 11, 12

Page 34: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Stores and synchs stuff

Tuesday, September 11, 12

Page 35: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

It just works ...

Tuesday, September 11, 12

Page 36: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

... when it works.

Tuesday, September 11, 12

Page 37: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Tuesday, September 11, 12

Page 38: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Tuesday, September 11, 12

Page 39: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

seamlessness can be a limit

Tuesday, September 11, 12

Page 40: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Questions•Have I to manage it?

•What’s the synch model?

•Who’s to pay?

• Impact on UX?

• Security?

Tuesday, September 11, 12

Page 41: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to manage it?• Learn the API

•Apple takes care of

• installation

• scalability

• security

Tuesday, September 11, 12

Page 42: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?

Tuesday, September 11, 12

Page 43: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Daemon•Monitors changes

•Works on metadata

• Shreds files

• Supports conflict resolution

Tuesday, September 11, 12

Page 44: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Special folder, synched

Tuesday, September 11, 12

Page 45: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Synched when “appropriate”

Tuesday, September 11, 12

Page 46: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Appropriate•Which OS?

•Which connection?

•Battery status?

Tuesday, September 11, 12

Page 47: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Types of Information•Key-value

•Documents

•CoreData

Tuesday, September 11, 12

Page 48: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who’s to pay?•The final user

•Your app will use his quota

•5Gb for free

Tuesday, September 11, 12

Page 49: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Impact on UX?

Tuesday, September 11, 12

Page 50: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Impact on UX?•User expectation

•No control on upload

• “Why isn’t there?”

•Open the app to synch

•User turns off iCloud?

Tuesday, September 11, 12

Page 51: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security

http://support.apple.com/kb/HT4865?viewlocale=en_US&locale=en_US

Tuesday, September 11, 12

Page 52: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security•Using the same API

•Mostly safe

•But ...

Tuesday, September 11, 12

Page 53: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security•Using the same API

•Mostly safe

•But ...

Tuesday, September 11, 12

Page 54: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Notes•> iOS5 “Documents” folder is backed up

•You can prevent files from being backed up

•App might be rejected

https://developer.apple.com/library/ios/#qa/qa1719/_index.html

Tuesday, September 11, 12

Page 55: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Dropbox

Tuesday, September 11, 12

Page 56: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Dropbox• File-based

• Special folder

• Synchronized across devices

• Supports other platforms

Tuesday, September 11, 12

Page 57: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to manage it?•Already set up

• installation

•bandwidth

• scalability

Tuesday, September 11, 12

Page 58: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?•Desktop synchronizes continuously

•Mobile apps have to query the backend

•HTTP API

• SDKs for iOS, Android, Ruby, Python

Tuesday, September 11, 12

Page 59: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?•No conflict resolution (revision #)

•Data serialization is up to you

•No file shredding

Tuesday, September 11, 12

Page 60: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who’s to pay?•The final user

•Your app will use his disk quota

•2 Gb for free

Tuesday, September 11, 12

Page 61: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Impact on UX?•Authentication the first time

•User might modify files

•Control on the upload

Tuesday, September 11, 12

Page 62: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security

https://www.dropbox.com/help/27/en

Tuesday, September 11, 12

Page 63: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security•Https required

•3rd party apps are “sandboxed”

•Apps are reviewed

Tuesday, September 11, 12

Page 64: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Similar•box.net

• sugarsync.com

•google drive

• amazon S3

Tuesday, September 11, 12

Page 65: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Parse

Tuesday, September 11, 12

Page 66: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Parse•Backend for mobile apps

• Files, key-value

•API for iOS, Android, Javascript and REST

•Push notifications

Tuesday, September 11, 12

Page 67: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Parse•User management

• account creation/verification

• Login with Twitter/Facebook

•ACL

Tuesday, September 11, 12

Page 68: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Have I to manage it?• Just learn the API

•Parse takes care of

• Installation

•Bandwidth

• Scalability

Tuesday, September 11, 12

Page 69: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

What’s the synch model?•ORM approach on steroids

•No need to serialize/deserialize

Tuesday, September 11, 12

Page 70: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

steroids?

Tuesday, September 11, 12

Page 71: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

PFObject *note = [PFObject objectWithClassName:@"Note"];

[note setObject:@"Ciao" forKey:@"title"];

[note setObject:@"Note on Parse" forKey:@"content"];

[note save];

//[note saveInBackground];//[note saveInBackgroundWithBlock:^( ){ }];//[note saveEventually]; <- steroids

Tuesday, September 11, 12

Page 72: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

PFObject *note = [PFObject objectWithClassName:@"Note"];

[note setObject:@"Ciao" forKey:@"title"];

[note setObject:@"Note on parse" forKey:@"content"];

PFObject *myTag = [PFObject objectWithClassName:@"Tag"];

[myTag setObject:@"important" forKey:@"tagName"];

// Add a relation[note setObject:myTag forKey:@"tag"];

// Saves both[note saveInBackground];

Tuesday, September 11, 12

Page 73: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who’s to pay?•You

•Pay as you use

• Limit of calls/mo

Tuesday, September 11, 12

Page 74: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Who’s to pay?•You

•Pay as you use

• Limit of calls/mo

Tuesday, September 11, 12

Page 75: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Security•Uses SSL to transmit

•ACL is up to you

•DBs are snapshotted every 30min

•You own data

Tuesday, September 11, 12

Page 76: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Similar services• cloudmine.me

• stackmob.com

•kinvey.com

•buddy.com

Tuesday, September 11, 12

Page 77: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Custom

Tuesday, September 11, 12

Page 78: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Tuesday, September 11, 12

Page 79: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

IaaS PaaS SaaS

Tuesday, September 11, 12

Page 80: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•Data

•Application

•Runtime

•Middleware

•OS

•Data

•Application

IaaS PaaS SaaS

Tuesday, September 11, 12

Page 81: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•Data

•Application

IaaS PaaS SaaS•Data

•Application

•Runtime

•Middleware

•OS

Tuesday, September 11, 12

Page 82: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•Data

•Application

IaaS PaaS•Data

•Application

•Runtime

•Middleware

•OS

Tuesday, September 11, 12

Page 83: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•Data

•Application

PaaS

Tuesday, September 11, 12

Page 84: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

PaaS Questions•Which language?

•Which DB?

Tuesday, September 11, 12

Page 85: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Heroku

Tuesday, September 11, 12

Page 86: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Languages•Ruby

•Python

• Java

• Scala

•Closure

•Node.js

Tuesday, September 11, 12

Page 87: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

DBs•Postgres

•MySQL (via addon)

•MongoDB (via addon)

Tuesday, September 11, 12

Page 88: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Dyno• Essentially a process

•Web

•Worker

•# of dynos + db profile + addons = backend cost

Tuesday, September 11, 12

Page 89: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•OS

•Middleware

•Runtime

•Data

•Application

•Data

•Application

IaaS PaaS

Tuesday, September 11, 12

Page 90: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•OS

•Middleware

•Runtime

•Data

•Application

IaaS

Tuesday, September 11, 12

Page 91: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Questions•Which OS?

•Which language?

•Which DB?

•How many machines?

Tuesday, September 11, 12

Page 92: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Amazon Web Services

Tuesday, September 11, 12

Page 93: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Amazon Web Services•CDN

• Storage

•Networking

•DBs

• Services: email, queue managers

Tuesday, September 11, 12

Page 94: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Good old way•Buy a server

•pick the hardware

• install OS

• rent space/bandwidth in a farm

Tuesday, September 11, 12

Page 95: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Server side frameworks

Tuesday, September 11, 12

Page 96: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Ruby•http://rubyonrails.org

•http://www.sinatrarb.com

•http://www.padrinorb.com

Tuesday, September 11, 12

Page 97: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Python•https://www.djangoproject.com

•http://www.pylonsproject.org

•http://flask.pocoo.org

Tuesday, September 11, 12

Page 98: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Node.js•http://expressjs.com

•http://geddyjs.org

•http://flatironjs.org

•http://railwayjs.com

•http://towerjs.org

Tuesday, September 11, 12

Page 99: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

ORM•ActiveRecord

•DataMapper

• Sequel

• SQLAlchemy

Tuesday, September 11, 12

Page 100: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Client side frameworks

Tuesday, September 11, 12

Page 101: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Networking•AFNetworking

•MKNetworkKit

•RestKit

•DataKit

Tuesday, September 11, 12

Page 102: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

To have a cake ...

Tuesday, September 11, 12

Page 103: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Use a box mix•Choose between flavors

•Add basic ingredients

•Bake

Tuesday, September 11, 12

Page 104: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Do it from scratch•Choose all the elements

•Preparation

•Bake

Tuesday, September 11, 12

Page 105: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

In conclusion ...

Tuesday, September 11, 12

Page 106: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

“You can’t always get what you wantbut if you try sometime, you just might find ...”

Tuesday, September 11, 12

Page 107: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

Rolling Stones

“You can’t always get what you wantbut if you try sometime, you just might find ...”

Tuesday, September 11, 12

Page 108: Choose Backend for Mobile Swipe2012

SWIPE CONFERENCE 2012

•twitter.com/_funkyboy

•app.net/funkyboy

•http://studiomagnolia.com

•http://www.icloudfordevelopers.com

Tuesday, September 11, 12