cheaper, faster, easier, better: building mobile apps with parse
DESCRIPTION
As presented at the Israel Mobile Summit 2014 by: Ali Parr, Facebook http://www.israelmobilesummit.comTRANSCRIPT
![Page 1: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/1.jpg)
![Page 2: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/2.jpg)
PHYSICAL SERVERSLOAD BALANCINGDATABASE BINDINGSRESTful APIROUTINGMIDDLEWAREAPP SECURITYAPP BUSINESS LOGICNETWORKINGCACHINGDATA MODELSUSER SESSIONSSOCIALPUSH NOTIFICATIONSFILESUI BINDINGS
![Page 3: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/3.jpg)
PHYSICAL SERVERSLOAD BALANCINGDATABASE BINDINGSRESTful APIROUTINGMIDDLEWAREAPP SECURITYAPP BUSINESS LOGICNETWORKINGCACHINGDATA MODELSUSER SESSIONSSOCIALPUSH NOTIFICATIONSFILESUI BINDINGSYOUR APP
![Page 4: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/4.jpg)
PARSE
YOUR APP
![Page 5: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/5.jpg)
Parse Core Parse Push Parse Analytics
![Page 6: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/6.jpg)
![Page 7: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/7.jpg)
Parse Core
![Page 8: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/8.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/9.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/10.jpg)
![Page 11: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/11.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/12.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/13.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/14.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/15.jpg)
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! }! }!};
![Page 16: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/16.jpg)
•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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/17.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/18.jpg)
![Page 19: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/19.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/20.jpg)
![Page 21: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/21.jpg)
![Page 22: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/22.jpg)
Parse Local Datastore
![Page 23: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/23.jpg)
Parse Push
![Page 24: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/24.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/25.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/26.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/27.jpg)
![Page 28: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/28.jpg)
Parse Analytics
![Page 29: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/29.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/30.jpg)
The Basics: Requests
![Page 31: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/31.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/32.jpg)
![Page 33: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/33.jpg)
Understanding Growth
![Page 34: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/34.jpg)
Understanding Retention
![Page 35: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/35.jpg)
Understanding Retention
![Page 36: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/36.jpg)
Understanding Retention
![Page 37: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/37.jpg)
!
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/38.jpg)
140,000new developers this year
![Page 39: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/39.jpg)
New Parse Customers
![Page 40: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/40.jpg)
![Page 41: Cheaper, Faster, Easier, Better: Building mobile apps with Parse](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/41.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022051314/54b4f3394a79598a3b8b45d8/html5/thumbnails/42.jpg)
Thanks - Questions?