You are on page 1of 108

Choosing a

backend for your


mobile application
Cesare Rocchi
studiomagnolia.com
_funkyboy

Tuesday, September 11, 12

Outline

Features

Overview
of
different
approaches

Needs when choosing a backend

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Who am I?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

UX designer and developer

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

mnml

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

< is >

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

execution matters

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

lean approach

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Who are you?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Quick version

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Its complicated

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Thank you!

SWIPE CONFERENCE 2012


Tuesday, September 11, 12


app.net/funkyboy

cesare@studiomagnolia.com

http://studiomagnolia.com

twitter.com/_funkyboy

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

App Target

Apps
which
are
inherently
mobile

Personal
usage

Backup
or
synchronization

Not apps where mobile is just a view

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Examples

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

dayoneapp.com

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

culturedcode.com/things

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

iawriter.com

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Questions

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to manage it?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to manage it?

Am
I
able
to
do
it?

Have
I
time
to
learn?

Is
it
worth
it?

At which level?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

Can
I
change
it
if
needed?

What
about
protocols?

Does it match my goals?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to pay?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to pay?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Who is to pay?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Impact on UX?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Impact on UX?

How
frequently?

is
it
ok
with
that?

Does it break any flow?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security?

Is
encryption
implemented?

How data are transferred?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Options

Dropbox

Parse
&
co.

Custom

iCloud

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

What is iCloud?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

6028 Startown Rd, Maiden, NC


SWIPE CONFERENCE 2012
Tuesday, September 11, 12

Stores and synchs stuff

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

It just works ...

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

... when it works.

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

seamlessness can be a limit

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Questions

Whats
the
synch
model?

Whos
to
pay?

Impact
on
UX?

Security?

Have I to manage it?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to manage it?

Apple
takes
care
of

installation

scalability

security

Learn the API

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Daemon

Works
on
metadata

Shreds
files

Supports
conflict
resolution

Monitors changes

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Special folder, synched

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Synched when appropriate

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Appropriate

Which
connection?

Battery
status?

Which OS?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Types of Information

Documents

CoreData

Key-value

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whos to pay?

Your
app
will
use
his
quota

5Gb
for
free

The final user

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Impact on UX?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Impact on UX?

No
control
on
upload

Why
isnt
there?

Open
the
app
to
synch

User
turns
off
iCloud?

User expectation

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security

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

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security

Mostly
safe

But
...

Using the same API

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security

Mostly
safe

But
...

Using the same API

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Notes

You
can
prevent
files
from
being
backed
up

App
might
be
rejected

> iOS5 Documents folder is backed up

https://developer.apple.com/library/ios/#qa/qa1719/_index.html
SWIPE CONFERENCE 2012
Tuesday, September 11, 12

Dropbox

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Dropbox

Special
folder

Synchronized
across
devices

Supports
other
platforms

File-based

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to manage it?

installation

bandwidth

scalability

Already set up

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

Mobile
apps
have
to
query
the
backend

HTTP
API

SDKs
for
iOS,
Android,
Ruby,
Python

Desktop synchronizes continuously

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

Data
serialization
is
up
to
you

No
file
shredding

No conflict resolution (revision #)

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whos to pay?

Your
app
will
use
his
disk
quota

2
Gb
for
free

The final user

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Impact on UX?

User
might
modify
files

Control
on
the
upload

Authentication the first time

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security

https://www.dropbox.com/help/27/en
SWIPE CONFERENCE 2012
Tuesday, September 11, 12

Security

3rd
party
apps
are
sandboxed

Apps
are
reviewed

Https required

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Similar

sugarsync.com

google
drive

amazon
S3

box.net

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Parse

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Parse

Files,
key-value

API
for
iOS,
Android,
Javascript
and
REST

Push
notifications

Backend for mobile apps

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Parse

account
creation/verification

Login
with
Twitter/Facebook

ACL

User management

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Have I to manage it?

Parse
takes
care
of

Installation

Bandwidth

Scalability

Just learn the API

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whats the synch model?

No
need
to
serialize/deserialize

ORM approach on steroids

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

steroids?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

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
SWIPE CONFERENCE 2012
Tuesday, September 11, 12

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];
SWIPE CONFERENCE 2012
Tuesday, September 11, 12

Whos to pay?

Pay
as
you
use

Limit
of
calls/mo

You

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Whos to pay?

Pay
as
you
use

Limit
of
calls/mo

You

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Security

ACL
is
up
to
you

DBs
are
snapshotted
every
30min

You
own
data

Uses SSL to transmit

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Similar services

stackmob.com

kinvey.com

buddy.com

cloudmine.me

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Custom

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

PaaS

SaaS

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

PaaS

Application

Runtime

Middleware

OS

Application

Data

SaaS

Data

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

PaaS

Application

Runtime

Middleware

OS

Application

Data

SaaS

Data

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

PaaS

Application
Runtime

Middleware
OS

Application

Data

Data

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

PaaS
Data
Application

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

PaaS Questions

Which
DB?

Which language?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Heroku

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Languages

Python

Java

Scala

Closure

Node.js

Ruby

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

DBs

MySQL
(via
addon)

MongoDB
(via
addon)

Postgres

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Dyno

Web

Worker

#
of
dynos
+
db
profile
+
addons
=
backend
cost

Essentially a process

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

PaaS

Middleware

Runtime

Data

Application

Application

OS

Data

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

IaaS

Middleware

Runtime

Data

Application

OS

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Questions

Which
language?

Which
DB?

How
many
machines?

Which OS?

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Amazon Web Services

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Amazon Web Services

Storage

Networking

DBs

Services:
email,
queue
managers

CDN

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Good old way

pick
the
hardware

install
OS

rent
space/bandwidth
in
a
farm

Buy a server

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Server side frameworks

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Ruby

http://www.sinatrarb.com

http://www.padrinorb.com

http://rubyonrails.org

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Python

http://www.pylonsproject.org

http://flask.pocoo.org

https://www.djangoproject.com

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Node.js

http://geddyjs.org

http://flatironjs.org

http://railwayjs.com

http://towerjs.org

http://expressjs.com

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

ORM

DataMapper

Sequel

SQLAlchemy

ActiveRecord

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Client side frameworks

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Networking

MKNetworkKit

RestKit

DataKit

AFNetworking

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

To have a cake ...

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Use a box mix

Add
basic
ingredients

Bake

Choose between flavors

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

Do it from scratch

Preparation

Bake

Choose all the elements

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

In conclusion ...

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

You cant always get what you want


but if you try sometime,
you just might find ...

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

You cant always get what you want


but if you try sometime,
you just might find ...
Rolling Stones
SWIPE CONFERENCE 2012
Tuesday, September 11, 12


app.net/funkyboy

http://studiomagnolia.com

http://www.icloudfordevelopers.com

twitter.com/_funkyboy

SWIPE CONFERENCE 2012


Tuesday, September 11, 12

You might also like