This document provides an overview of the Parse platform and its capabilities for building mobile and web applications. It describes Parse Core which allows storing and querying data in the cloud. It also covers user authentication, social integration, push notifications, cloud code, and analytics tracking. The document shows how to perform common tasks like saving and querying objects, user signup/login, and sending push notifications. It emphasizes that Parse provides a full backend as a service to focus on app business logic and UI rather than operations.
2. PHYSICAL SERVERS
LOAD BALANCING
DATABASE BINDINGS
RESTful API
ROUTING
MIDDLEWARE
APP SECURITY
APP BUSINESS LOGIC
NETWORKING
CACHING
DATA MODELS
USER SESSIONS
SOCIAL
PUSH NOTIFICATIONS
FILES
UI BINDINGS
3. PHYSICAL SERVERS
LOAD BALANCING
DATABASE BINDINGS
RESTful API
ROUTING
MIDDLEWARE
APP SECURITY
APP BUSINESS LOGIC
NETWORKING
CACHING
DATA MODELS
USER SESSIONS
SOCIAL
PUSH NOTIFICATIONS
FILES
UI BINDINGS
YOUR APP
8. Your data in the cloud
Title
Time
Track
Key Value
title “Getting Started with Parse
track “Track 1”
time September 5, 2013 12:45 PM +0700
Talk
Parse Data
9. 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
10.
11. 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
12. 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
13. Easy User Management
Parse 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
14. 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
ParseUser
ParseUser user = new ParseUser();!
user.setUsername(“janedoe”);!
user.setPassword(“mypassword123”);!
user.setEmail(“janedoe@fb.com”);!
user.signUpInBackground();
15. 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 Networks
ParseFacebookUtils.link(user, this, new SaveCallback() {!
@Override!
public void done(ParseException e) {!
if (ParseFacebookUtils.isLinked(user)) {!
// The user added their Facebook account!
}!
}!
};
Facebook
16. •Background Jobs
•For long running jobs
•Can be scheduled
Run custom app code in the Parse Cloud
Cloud Code
•Running Code when Objects are Saved or Deleted
•Cloud functions & custom webhooks
17. A Simple Background Job
Parse.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.”);
});
});
18.
19. 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
25. ParsePush push = new ParsePush();!
push.setChannel(“Giants”);!
push.setMessage(“The game starts in 5!”);!
push.sendInBackground();
Push to a Channel
Subscribe users by interest or category
26. Find users who match particular criteria
Push 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();
31. 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