SlideShare a Scribd company logo
1 of 17
Download to read offline
Parse.com
Mobile app platform
By John Tubert
Why parse.com?
● Free (to start)
● No server needed
● Easy to use
● Multi-platform
How to get started
1. Create free account
2. Download SDK or blank xcode project
3. Start coding
How to really get started
1. Add framework to project
2. Add import statement to prefix file
a. #import <Parse/Parse.h>
3. Initialize parse on delegate file
a. [Parse setApplicationId:@"" clientKey:@""];
4. Add code to read or write to parse.com
Register/login users
Show LoginAndSignUpDemo
Write
PFObject *addressObject = [PFObject objectWithClassName:@"Addresses"];
[addressObject setObject:@"John Tubert" forKey:@"name"];
[addressObject setObject:@"350 west 39th Street" forKey:@"Address"];
[addressObject setObject:@"New York" forKey:@"City"];
[addressObject setObject:@"NY" forKey:@"State"];
[addressObject setObject:@"10018" forKey:@"Zip"];
[addressObject save];
Count
PFQuery *queryPhotoCount = [PFQuery queryWithClassName:@"Photo"];
[queryPhotoCount whereKey:kPAPPhotoUserKey equalTo:[PFUser
currentUser]];
[queryPhotoCount setCachePolicy:kPFCachePolicyCacheThenNetwork];
[queryPhotoCount countObjectsInBackgroundWithBlock:^(int number,
NSError *error) {
if (!error) {
NSLog(@"count: %i",number);
}
}];
Read
PFQuery *query = [PFQuery queryWithClassName:@"Addresses"];
[query setCachePolicy:kPFCachePolicyCacheThenNetwork];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError
*error) {
if (error) {
NSLog(@"error %@",error);
}else{
NSLog(@"objects %@",objects);
}
}];
Read (with constraints)
PFQuery *query = [PFQuery queryWithClassName:@"Addresses"];
[query whereKey:@"name" containsString:@"John"];
[query setCachePolicy:kPFCachePolicyCacheThenNetwork];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError
*error) {
if (error) {
NSLog(@"error %@",error);
}else{
NSLog(@"objects %@",objects);
}
}];
More constraints
Basic Constraints
- (void)includeKey:(NSString *)key;
- (void)whereKeyExists:(NSString *)key;
- (void)whereKeyDoesNotExist:(NSString *)key;
- (void)whereKey:(NSString *)key equalTo:(id)object;
- (void)whereKey:(NSString *)key lessThan:(id)object;
- (void)whereKey:(NSString *)key lessThanOrEqualTo:(id)object;
- (void)whereKey:(NSString *)key greaterThan:(id)object;
- (void)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object;
- (void)whereKey:(NSString *)key notEqualTo:(id)object;
- (void)whereKey:(NSString *)key containedIn:(NSArray *)array;
- (void)whereKey:(NSString *)key notContainedIn:(NSArray *)array;
Location Constraints
- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint;
- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinMiles:(double)maxDistance;
- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinKilometers:(double)maxDistance;
- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinRadians:(double)maxDistance;
- (void)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)
northeast;
String Constraints
- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex;
- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex modifiers:(NSString *)modifiers;
- (void)whereKey:(NSString *)key containsString:(NSString *)substring;
- (void)whereKey:(NSString *)key hasPrefix:(NSString *)prefix;
- (void)whereKey:(NSString *)key hasSuffix:(NSString *)suffix;
Saving photos
PFObject *photo = [PFObject objectWithClassName:kPAPPhotoClassKey];
[photo setObject:[PFUser currentUser] forKey:kPAPPhotoUserKey];
[photo setObject:self.photoFile forKey:kPAPPhotoPictureKey];
[photo setObject:self.thumbnailFile forKey:kPAPPhotoThumbnailKey];
[photo save];
DEMO
Show ArchUp demo
Demo: using JS API
http://jtubert.com/sketchit/
Server side methods
(AKA: cloud code)
Parse.Cloud.define("hello", function(request, response) {
response.success("Hello Parse world!");
});
Getting started: Cloud code
Install the command line tool:
curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash
Create new project:
$ parse new MyCloudCode
Write functions:
Parse.Cloud.define("hello", function(request, response) {
response.success("Hello world!");
});
Deploy code:
$ parse deploy
Call methods from app:
[PFCloud callFunctionInBackground:@"hello" withParameters:@{} block:^(NSString *result, NSError
*error) {
if (!error) {
// result is @"Hello world!"
NSLog(@"%@",result);
}
}];
Questions/
Comments
THANKS

More Related Content

Viewers also liked

Viewers also liked (19)

Building native mobile Apps with ReactNative
Building native mobile Apps with ReactNative Building native mobile Apps with ReactNative
Building native mobile Apps with ReactNative
 
Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...
 
The Gist of React Native
The Gist of React NativeThe Gist of React Native
The Gist of React Native
 
Developing Apps With React Native
Developing Apps With React NativeDeveloping Apps With React Native
Developing Apps With React Native
 
Florin React Native Meetup
Florin React Native MeetupFlorin React Native Meetup
Florin React Native Meetup
 
[React Native Tutorial] Lecture 3: More on ES6/ES2015
[React Native Tutorial] Lecture 3: More on ES6/ES2015[React Native Tutorial] Lecture 3: More on ES6/ES2015
[React Native Tutorial] Lecture 3: More on ES6/ES2015
 
React native - What, Why, How?
React native - What, Why, How?React native - What, Why, How?
React native - What, Why, How?
 
React Native
React NativeReact Native
React Native
 
React native redux_sharing
React native redux_sharingReact native redux_sharing
React native redux_sharing
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
 
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScriptReact Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
 
React Native
React NativeReact Native
React Native
 
Intro to react native
Intro to react nativeIntro to react native
Intro to react native
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
 
Workshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedWorkshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux Advanced
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
 
React Native for Web
React Native for WebReact Native for Web
React Native for Web
 
React Native na globo.com
React Native na globo.comReact Native na globo.com
React Native na globo.com
 

Similar to Parse.com

Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCABeginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Whymca
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C Strategy
Graham Lee
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
Kiev ALT.NET
 

Similar to Parse.com (20)

Modernize your Objective-C
Modernize your Objective-CModernize your Objective-C
Modernize your Objective-C
 
Parse: 5 tricks that won YC Hacks
Parse: 5 tricks that won YC HacksParse: 5 tricks that won YC Hacks
Parse: 5 tricks that won YC Hacks
 
Webエンジニアから見たiOS5
Webエンジニアから見たiOS5Webエンジニアから見たiOS5
Webエンジニアから見たiOS5
 
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCABeginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C Strategy
 
Modernizes your objective C - Oliviero
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - Oliviero
 
Taking Objective-C to the next level. UA Mobile 2016.
Taking Objective-C to the next level. UA Mobile 2016.Taking Objective-C to the next level. UA Mobile 2016.
Taking Objective-C to the next level. UA Mobile 2016.
 
Introduction to Spring Boot.pdf
Introduction to Spring Boot.pdfIntroduction to Spring Boot.pdf
Introduction to Spring Boot.pdf
 
Dartprogramming
DartprogrammingDartprogramming
Dartprogramming
 
greenDAO
greenDAOgreenDAO
greenDAO
 
Crawler 2
Crawler 2Crawler 2
Crawler 2
 
JSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than TwilightJSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than Twilight
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development Intro
 
For mobile 5/13'
For mobile 5/13'For mobile 5/13'
For mobile 5/13'
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
How to Write Node.js Module
How to Write Node.js ModuleHow to Write Node.js Module
How to Write Node.js Module
 
Objective-C Crash Course for Web Developers
Objective-C Crash Course for Web DevelopersObjective-C Crash Course for Web Developers
Objective-C Crash Course for Web Developers
 
PesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShell
PesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShellPesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShell
PesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShell
 
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
 
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
 

More from John Tubert

Bunch of random tech things
Bunch of random tech thingsBunch of random tech things
Bunch of random tech things
John Tubert
 

More from John Tubert (8)

Sibling rivalry tech vs. philosophy on bias in ai
Sibling rivalry  tech vs. philosophy on bias in aiSibling rivalry  tech vs. philosophy on bias in ai
Sibling rivalry tech vs. philosophy on bias in ai
 
Sibling rivalry tech vs. philosophy on bias & AI
Sibling rivalry  tech vs. philosophy on bias & AISibling rivalry  tech vs. philosophy on bias & AI
Sibling rivalry tech vs. philosophy on bias & AI
 
Extreme Danger of bias in Artificial Inteligence
Extreme Danger of bias in Artificial InteligenceExtreme Danger of bias in Artificial Inteligence
Extreme Danger of bias in Artificial Inteligence
 
LeapMotion
LeapMotionLeapMotion
LeapMotion
 
Sketchio presentation at Parse Developer meetup
Sketchio presentation at Parse Developer meetupSketchio presentation at Parse Developer meetup
Sketchio presentation at Parse Developer meetup
 
Browserless javascript testing
Browserless javascript testingBrowserless javascript testing
Browserless javascript testing
 
Drawing room experiment
Drawing room experimentDrawing room experiment
Drawing room experiment
 
Bunch of random tech things
Bunch of random tech thingsBunch of random tech things
Bunch of random tech things
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Parse.com

  • 2. Why parse.com? ● Free (to start) ● No server needed ● Easy to use ● Multi-platform
  • 3. How to get started 1. Create free account 2. Download SDK or blank xcode project 3. Start coding
  • 4. How to really get started 1. Add framework to project 2. Add import statement to prefix file a. #import <Parse/Parse.h> 3. Initialize parse on delegate file a. [Parse setApplicationId:@"" clientKey:@""]; 4. Add code to read or write to parse.com
  • 6. Write PFObject *addressObject = [PFObject objectWithClassName:@"Addresses"]; [addressObject setObject:@"John Tubert" forKey:@"name"]; [addressObject setObject:@"350 west 39th Street" forKey:@"Address"]; [addressObject setObject:@"New York" forKey:@"City"]; [addressObject setObject:@"NY" forKey:@"State"]; [addressObject setObject:@"10018" forKey:@"Zip"]; [addressObject save];
  • 7. Count PFQuery *queryPhotoCount = [PFQuery queryWithClassName:@"Photo"]; [queryPhotoCount whereKey:kPAPPhotoUserKey equalTo:[PFUser currentUser]]; [queryPhotoCount setCachePolicy:kPFCachePolicyCacheThenNetwork]; [queryPhotoCount countObjectsInBackgroundWithBlock:^(int number, NSError *error) { if (!error) { NSLog(@"count: %i",number); } }];
  • 8. Read PFQuery *query = [PFQuery queryWithClassName:@"Addresses"]; [query setCachePolicy:kPFCachePolicyCacheThenNetwork]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"error %@",error); }else{ NSLog(@"objects %@",objects); } }];
  • 9. Read (with constraints) PFQuery *query = [PFQuery queryWithClassName:@"Addresses"]; [query whereKey:@"name" containsString:@"John"]; [query setCachePolicy:kPFCachePolicyCacheThenNetwork]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"error %@",error); }else{ NSLog(@"objects %@",objects); } }];
  • 10. More constraints Basic Constraints - (void)includeKey:(NSString *)key; - (void)whereKeyExists:(NSString *)key; - (void)whereKeyDoesNotExist:(NSString *)key; - (void)whereKey:(NSString *)key equalTo:(id)object; - (void)whereKey:(NSString *)key lessThan:(id)object; - (void)whereKey:(NSString *)key lessThanOrEqualTo:(id)object; - (void)whereKey:(NSString *)key greaterThan:(id)object; - (void)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object; - (void)whereKey:(NSString *)key notEqualTo:(id)object; - (void)whereKey:(NSString *)key containedIn:(NSArray *)array; - (void)whereKey:(NSString *)key notContainedIn:(NSArray *)array; Location Constraints - (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint; - (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinMiles:(double)maxDistance; - (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinKilometers:(double)maxDistance; - (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinRadians:(double)maxDistance; - (void)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *) northeast; String Constraints - (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex; - (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex modifiers:(NSString *)modifiers; - (void)whereKey:(NSString *)key containsString:(NSString *)substring; - (void)whereKey:(NSString *)key hasPrefix:(NSString *)prefix; - (void)whereKey:(NSString *)key hasSuffix:(NSString *)suffix;
  • 11. Saving photos PFObject *photo = [PFObject objectWithClassName:kPAPPhotoClassKey]; [photo setObject:[PFUser currentUser] forKey:kPAPPhotoUserKey]; [photo setObject:self.photoFile forKey:kPAPPhotoPictureKey]; [photo setObject:self.thumbnailFile forKey:kPAPPhotoThumbnailKey]; [photo save];
  • 13. Demo: using JS API http://jtubert.com/sketchit/
  • 14. Server side methods (AKA: cloud code) Parse.Cloud.define("hello", function(request, response) { response.success("Hello Parse world!"); });
  • 15. Getting started: Cloud code Install the command line tool: curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash Create new project: $ parse new MyCloudCode Write functions: Parse.Cloud.define("hello", function(request, response) { response.success("Hello world!"); }); Deploy code: $ parse deploy Call methods from app: [PFCloud callFunctionInBackground:@"hello" withParameters:@{} block:^(NSString *result, NSError *error) { if (!error) { // result is @"Hello world!" NSLog(@"%@",result); } }];