SlideShare a Scribd company logo
Writing Parse Apps 
Armenian Dev Meetup
What is MBaaS?
Why Parse? 
● Learning curve 
● Documentation 
● Examples 
● Support
Parse 
● Platform for mobile developers 
● Founded Jun 2011, YC 
● Acquired by Facebook, Apr 2013 
● Built on Amazon Web Services
Parse Architecture
Products
Client SDKs
Quickstart
Object Model 
PFObject - unstructured key-value data object 
PFObject *book = [PFObject objectWithClassName:@”Book”]; 
book[@”title”] = @”The Little Prince”; 
[book saveInBackground]; 
... 
int pages = [[book objectForKey:@”pages”] intValue]; 
NSString *objectId = hotel.objectId; 
NSDate *createdAt = hotel.createdAt; (updatedAt) 
... 
[book saveEventually];
Queries 
PFQuery *query = [PFQuery queryWithClassName:@”Book”]; 
[query getObjectInBackgroundWithId:@”xWMyZ4YEGZ” block:^(PFObject *book, 
NSError *error) { 
NSLog(@”%@”, book); 
} 
… 
[query whereKey:@”author” equalTo:@”Jack London”]; 
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) 
{…}] 
… 
query.limit = 5; query.skip = 10; 
[query orderByAscending:@”title”]; 
[query selectKeys:@[@”title”, @”pages”];
Relational Queries 
PFQuery *query = [PFQuery queryWithClassName:@”Comment”]; 
[query whereKey:@”book” equalTo:theBook]; 
… 
PFQuery *innerQuery = [PFQuery queryWithClassName:@”Book”]; 
[innerQuery whereKeyExists:@”image”]; 
PFQuery *query = [PFQuery queryWithClassName:@”Comment”]; 
[query whereKey:@”book” matchesQuery:innerQuery]; 
… 
query.cachePolicy = kPFCachePolicyNetworkElseCache; 
[query includeKey:@”author”]; 
… 
PFQuery *query = [PFQuery orQueryWithSubqueries:@[queryA, queryB]];
Files and Images 
NSData *data = UIImagePNGRepresentation(image); // (up to 10MB) 
PFFile *file = [PFFile filwWithName:@”attachment.png” data:data]; 
[file saveInBackground]; 
… 
PFObject *message = [PFObject objectWithClassName:@”Message”]; 
message[@”attatchment”] = file; 
[message saveInBackground]; 
… 
PFFile *imageFile = article[@”imageFile”]; 
[imageFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) { 
if (!error) { 
UIImage *image = [UIImage imageWithData:data]; 
}];
Users 
PFUser - user subclass of PFObject 
PFUser *user = [PFUser user]; 
user.username = @“myname”; // required 
user.password = @”mypass”; // required on signup 
user.email = @”email@example.com”; // optional 
[user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error){...}]; 
[PFUser logInUsernameInBackground@”myname” password:@”mypass” 
block:^(PFUser *user, NSError *error) {...}]; 
PFUser *currentUser = [PFUser currentUser]; 
[PFUser logOut]; 
[PFUser requestPasswordRequestForEmailInBackground:@”email@example.com”];
Social Integrations 
● Facebook and Twitter 
● Login & Signup 
● Link & unlinking existing users 
● API calls
Cloud Code 
● Custom code on server 
● Command line tool (parse new, deploy) 
Parse.Cloud.define(“hello”, function(request, response) { 
response.success(“hello world”); // 15 sec limit 
}); 
[PFCloud callFunctionInBackground:@”hello” withParameters:@{} 
block:^(NSString *results, NSError *error) {...} 
}]; 
Parse.Cloud.beforeSave(“Book”, …); // 3 sec limit 
Parse.Cloud.afterDelete(Parse.User, …);
UI Components 
● PFLoginViewController 
● PFSignUpViewController 
● PFQueryTableViewController 
● PFImageView 
● PFTableCellView
Data Browser
Analytics
Pricing
Recommendations 
● Prototyping 
● Wrap Parse API 
● Development vs. Production 
● ACL 
● Cloud Code
Q&A 
Thanks!

More Related Content

What's hot (18)

PPTX
FuncUnit
Brian Moschel
 
PDF
Introducing jQuery
Wildan Maulana
 
PDF
Javascript, DOM, browsers and frameworks basics
Net7
 
PPTX
Put a little Backbone in your WordPress
adamsilverstein
 
ODP
Indexed db
Martin Giger
 
PDF
Porting Flashblock to Jetpack Platform (draft)
Thomas Bassetto
 
PDF
WordPress as the Backbone(.js)
Beau Lebens
 
KEY
Practical Use of MongoDB for Node.js
async_io
 
PDF
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Vladimir Roudakov
 
PDF
Developing iOS REST Applications
lmrei
 
PPT
Kick start with j query
Md. Ziaul Haq
 
PDF
Webinar: Getting Started with Ruby and MongoDB
MongoDB
 
PPTX
Php sessions
JIGAR MAKHIJA
 
PPT
Yuihacku iitd-sumana
Sumana Hariharan
 
PPTX
WebMatrix 100-level presentation
Alice Pang
 
PPT
Easy javascript
Bui Kiet
 
KEY
Advanced WordPress Development Environments
Beau Lebens
 
FuncUnit
Brian Moschel
 
Introducing jQuery
Wildan Maulana
 
Javascript, DOM, browsers and frameworks basics
Net7
 
Put a little Backbone in your WordPress
adamsilverstein
 
Indexed db
Martin Giger
 
Porting Flashblock to Jetpack Platform (draft)
Thomas Bassetto
 
WordPress as the Backbone(.js)
Beau Lebens
 
Practical Use of MongoDB for Node.js
async_io
 
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Vladimir Roudakov
 
Developing iOS REST Applications
lmrei
 
Kick start with j query
Md. Ziaul Haq
 
Webinar: Getting Started with Ruby and MongoDB
MongoDB
 
Php sessions
JIGAR MAKHIJA
 
Yuihacku iitd-sumana
Sumana Hariharan
 
WebMatrix 100-level presentation
Alice Pang
 
Easy javascript
Bui Kiet
 
Advanced WordPress Development Environments
Beau Lebens
 

Similar to Introduction to Parse backend for mobile developers (20)

PPTX
Leveraging parse.com for Speedy Development
Andrew Kozlik
 
PDF
Parse par Nicolas Lauquin
CocoaHeads France
 
PDF
iOS App with Parse.com as RESTful Backend
Stefano Zanetti
 
PPTX
What's Parse
Tsutomu Ogasawara
 
PPTX
Parsing in ios to create an app
HeaderLabs .
 
PDF
Workshop: building your mobile backend with Parse - Droidcon Paris2014
Paris Android User Group
 
PDF
Parse: 5 tricks that won YC Hacks
Thomas Bouldin
 
PDF
Elements for an iOS Backend
Laurent Cerveau
 
PPT
Persistencia de datos con Parse
Alfonso Alba
 
PDF
第一次用Parse就深入淺出
Ymow Wu
 
PDF
Building Android apps with Parse
DroidConTLV
 
PPTX
Intro to Parse
Tushar Acharya
 
PDF
Parse.com
John Tubert
 
PDF
Node.js and Parse
Nicholas McClay
 
PDF
Standard parse server
davidolesch
 
PPT
Connecting to a REST API in iOS
gillygize
 
PDF
Parse - a mobile backend platform
Carlotta Tatti
 
PDF
Firebase: Totally Not Parse All Over Again (Unless It Is)
Chris Adamson
 
PDF
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Chris Adamson
 
PDF
Parse - Backend as a Service
Ali Davut
 
Leveraging parse.com for Speedy Development
Andrew Kozlik
 
Parse par Nicolas Lauquin
CocoaHeads France
 
iOS App with Parse.com as RESTful Backend
Stefano Zanetti
 
What's Parse
Tsutomu Ogasawara
 
Parsing in ios to create an app
HeaderLabs .
 
Workshop: building your mobile backend with Parse - Droidcon Paris2014
Paris Android User Group
 
Parse: 5 tricks that won YC Hacks
Thomas Bouldin
 
Elements for an iOS Backend
Laurent Cerveau
 
Persistencia de datos con Parse
Alfonso Alba
 
第一次用Parse就深入淺出
Ymow Wu
 
Building Android apps with Parse
DroidConTLV
 
Intro to Parse
Tushar Acharya
 
Parse.com
John Tubert
 
Node.js and Parse
Nicholas McClay
 
Standard parse server
davidolesch
 
Connecting to a REST API in iOS
gillygize
 
Parse - a mobile backend platform
Carlotta Tatti
 
Firebase: Totally Not Parse All Over Again (Unless It Is)
Chris Adamson
 
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Chris Adamson
 
Parse - Backend as a Service
Ali Davut
 
Ad

Recently uploaded (20)

PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Executive Business Intelligence Dashboards
vandeslie24
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Ad

Introduction to Parse backend for mobile developers

  • 1. Writing Parse Apps Armenian Dev Meetup
  • 3. Why Parse? ● Learning curve ● Documentation ● Examples ● Support
  • 4. Parse ● Platform for mobile developers ● Founded Jun 2011, YC ● Acquired by Facebook, Apr 2013 ● Built on Amazon Web Services
  • 9. Object Model PFObject - unstructured key-value data object PFObject *book = [PFObject objectWithClassName:@”Book”]; book[@”title”] = @”The Little Prince”; [book saveInBackground]; ... int pages = [[book objectForKey:@”pages”] intValue]; NSString *objectId = hotel.objectId; NSDate *createdAt = hotel.createdAt; (updatedAt) ... [book saveEventually];
  • 10. Queries PFQuery *query = [PFQuery queryWithClassName:@”Book”]; [query getObjectInBackgroundWithId:@”xWMyZ4YEGZ” block:^(PFObject *book, NSError *error) { NSLog(@”%@”, book); } … [query whereKey:@”author” equalTo:@”Jack London”]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {…}] … query.limit = 5; query.skip = 10; [query orderByAscending:@”title”]; [query selectKeys:@[@”title”, @”pages”];
  • 11. Relational Queries PFQuery *query = [PFQuery queryWithClassName:@”Comment”]; [query whereKey:@”book” equalTo:theBook]; … PFQuery *innerQuery = [PFQuery queryWithClassName:@”Book”]; [innerQuery whereKeyExists:@”image”]; PFQuery *query = [PFQuery queryWithClassName:@”Comment”]; [query whereKey:@”book” matchesQuery:innerQuery]; … query.cachePolicy = kPFCachePolicyNetworkElseCache; [query includeKey:@”author”]; … PFQuery *query = [PFQuery orQueryWithSubqueries:@[queryA, queryB]];
  • 12. Files and Images NSData *data = UIImagePNGRepresentation(image); // (up to 10MB) PFFile *file = [PFFile filwWithName:@”attachment.png” data:data]; [file saveInBackground]; … PFObject *message = [PFObject objectWithClassName:@”Message”]; message[@”attatchment”] = file; [message saveInBackground]; … PFFile *imageFile = article[@”imageFile”]; [imageFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) { if (!error) { UIImage *image = [UIImage imageWithData:data]; }];
  • 13. Users PFUser - user subclass of PFObject PFUser *user = [PFUser user]; user.username = @“myname”; // required user.password = @”mypass”; // required on signup user.email = @”[email protected]”; // optional [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error){...}]; [PFUser logInUsernameInBackground@”myname” password:@”mypass” block:^(PFUser *user, NSError *error) {...}]; PFUser *currentUser = [PFUser currentUser]; [PFUser logOut]; [PFUser requestPasswordRequestForEmailInBackground:@”[email protected]”];
  • 14. Social Integrations ● Facebook and Twitter ● Login & Signup ● Link & unlinking existing users ● API calls
  • 15. Cloud Code ● Custom code on server ● Command line tool (parse new, deploy) Parse.Cloud.define(“hello”, function(request, response) { response.success(“hello world”); // 15 sec limit }); [PFCloud callFunctionInBackground:@”hello” withParameters:@{} block:^(NSString *results, NSError *error) {...} }]; Parse.Cloud.beforeSave(“Book”, …); // 3 sec limit Parse.Cloud.afterDelete(Parse.User, …);
  • 16. UI Components ● PFLoginViewController ● PFSignUpViewController ● PFQueryTableViewController ● PFImageView ● PFTableCellView
  • 20. Recommendations ● Prototyping ● Wrap Parse API ● Development vs. Production ● ACL ● Cloud Code

Editor's Notes

  • #10: NSMutableDictioray
  • #13: saveInBackgroundWithBlock:progressBlock:
  • #14: emailVerified PFAnyonymousUtils ACL Roles
  • #16: Background jobs (15 min) Schedule
  • #18: GeoPoint
  • #20: 10 req/s = $100 background jobs = rate/20