cheaper, faster, easier, better: building mobile apps with parse

42

Upload: israel-mobile-summit

Post on 13-Jan-2015

278 views

Category:

Technology


0 download

DESCRIPTION

As presented at the Israel Mobile Summit 2014 by: Ali Parr, Facebook http://www.israelmobilesummit.com

TRANSCRIPT

Page 1: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 2: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

PHYSICAL SERVERSLOAD BALANCINGDATABASE BINDINGSRESTful APIROUTINGMIDDLEWAREAPP SECURITYAPP BUSINESS LOGICNETWORKINGCACHINGDATA MODELSUSER SESSIONSSOCIALPUSH NOTIFICATIONSFILESUI BINDINGS

Page 3: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

PHYSICAL SERVERSLOAD BALANCINGDATABASE BINDINGSRESTful APIROUTINGMIDDLEWAREAPP SECURITYAPP BUSINESS LOGICNETWORKINGCACHINGDATA MODELSUSER SESSIONSSOCIALPUSH NOTIFICATIONSFILESUI BINDINGSYOUR APP

Page 4: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

PARSE

YOUR APP

Page 5: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Core Parse Push Parse Analytics

Page 6: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 7: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Core

Page 8: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Your data in the cloud

Title

Time

TrackKey Value

title “Getting Started with Parse

track “Track 1”

time September 5, 2013 12:45 PM +0700

Talk

Parse Data

Page 9: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

talk.saveInBackground();

talk.put(“title”, “Getting Started with Parse”);!talk.put(“track”, “Track 1”);!talk.put(“time”, talkDate); // Date

ParseObject talk = new ParseObject(”Talk”);

Key Value

title “Getting Started with Parse

track “Track 1”

time September 5, 2013 12:45 PM +0700

Talk

Creating and Saving an Object

Page 10: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 11: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

ParseQuery<ParseObject> query = ParseQuery.getQuery(”Talk”);

query.findInBackground(new FindCallback<ParseObject>(){! public void done(List<ParseObject> talkList, ParseException e) {!

if (e == null) {! // We have a list of all the Basic track talks! } else {! // Something went wrong; check the ParseException! }! }

}

// Find only the talks that are in the Basic track!query.whereEqualTo(”track”,”basic”);

Getting a List of Objects

Page 12: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

byte[] data = myPhotoObject.toByteArray();ParseFile image = new ParseFile(”Parse-2.jpg”, data);!image.saveInBackground();

ParseObject picture = new ParseObject(”Picture”);!picture.put(“title”, “Red Hot Chili Peppers concert”);!picture.put(“image”, image);!picture.saveInBackground();

Saving Files

Page 13: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Easy User ManagementParse Social

•ParseUsers make it simple to:• Sign up

• Log in

• Manage user session with “currentUser”

• Create Roles in your app

• Improve app security with ACLs

• Integrate with Facebook and Twitter

Page 14: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

ParseUser.logInInBackground( “janedoe”, ! “mypassword123”, new LogInCallback() {! public void done(ParseUser user, ParseException e) {! if (user != null) {! // The user is logged in! } else {! // Something went wrong; check the ParseException! }! }!});

Sign up

Log in

ParseUserParseUser user = new ParseUser();!user.setUsername(“janedoe”);!user.setPassword(“mypassword123”);!user.setEmail(“[email protected]”);!user.signUpInBackground();

Page 15: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

ParseTwitterUtils.link(user, this, new SaveCallback() {! @Override! public void done(ParseException e) {! if (ParseTwitterUtils.isLinked(user)) {!

// The user added their Twitter account! }! }!};

Twitter :(

Link to Social NetworksParseFacebookUtils.link(user, this, new SaveCallback() {! @Override! public void done(ParseException e) {! if (ParseFacebookUtils.isLinked(user)) {!

// The user added their Facebook account! }! }!};

Facebook

Page 16: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

•Background Jobs

•For long running jobs

•Can be scheduled

Run custom app code in the Parse CloudCloud Code

•Running Code when Objects are Saved or Deleted

•Cloud functions & custom webhooks

Page 17: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

A Simple Background JobParse.Cloud.job(“userMigration”, function (request, status) {! // Set up to modify user data    Parse.Cloud.useMasterKey();! // Query for all users! var query = new Parse.Query(Parse.User);! query.each(function(user) {! // Set and save the change! user.set(“plan”, request.params.plan);! return user.save();    }).then(function() {! // Set the job’s success status! status.success(“Migration completed successfully.”);    }, function(error) {      // Set the job’s error status      status.error(“Uh oh, something went wrong.”);    }); });

Page 18: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 19: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Integrate with virtually any third-party service

•Parse Image Module• Resize, crop, scale

• Change image format

•User Session Module• For server-side apps

• Manage user session across pages

Cloud Modules

•Send text messages, emails, or accept payments

•Connect to services with Parse.Cloud.httpRequest

Page 20: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 21: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 22: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Local Datastore

Page 23: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Push

Page 24: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

ParseInstallation.getCurrentInstallation().saveInBackground();

• Pushes are sent to Installations

•1 device + 1 install of your app = 1 Installation

• Add relationships to objects of interest, e.g. current User

Push NotificationsInstallations

Page 25: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

ParsePush push = new ParsePush();!push.setChannel(“Giants”);!push.setMessage(“The game starts in 5!”);!push.sendInBackground();

Push to a ChannelSubscribe users by interest or category

Page 26: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Find users who match particular criteriaPush to a Query

ParseQuery pushQuery = ParseInstallation.getQuery();!pushQuery.whereEqualTo(“isFacebookEmployee”, true);!!!ParsePush push = new ParsePush();!push.setQuery(pushQuery);!push.setMessage(“Good afternoon, Facebook!”);!push.sendInBackground();

Page 27: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 28: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Analytics

Page 29: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Analytics

Measure App Usage• API calls

• App open rates

• Push campaigns

• Custom events

Track Any Data Point In Real Time

Page 30: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

The Basics: Requests

Page 31: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

event: "signedUp"!dimensions: {! gender: "f",! source: "web",! friendsUsingApp: "35",! wasReferred: "true"!}

• Note:

• Each event can have a maximum of 4 dimensions

•Dimensions must be strings

Dive Deeper: Custom Analytics•Save a free-form event with dimensions for segmenting results

Page 32: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 33: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Understanding Growth

Page 34: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Understanding Retention

Page 35: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Understanding Retention

Page 36: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Understanding Retention

Page 37: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

!

Over 260,000 Apps Built!

0

50,000

100,000

150,000

300,000

2011 2012 2013 2014

200,000

250,000

2015

Apps

bui

lt on

Par

se

Page 38: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

140,000new developers this year

Page 39: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

New Parse Customers

Page 40: Cheaper, Faster, Easier, Better: Building mobile apps with Parse
Page 41: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Parse Core Parse Push Parse Analytics

UNLIMITED up to 30 requests/sec UNLIMITED up to 1,000,000 recipients UNLIMITED data points

Page 42: Cheaper, Faster, Easier, Better: Building mobile apps with Parse

Thanks - Questions?