CocoaHeads ParisJeudi 14 novembre 2013 Nicolas Lauquin
« Parse is the easiest way to get a backend up and running for your mobile application »
OverviewEasy backend building & nice web interface Push Analytics Social & authentification (Facebook connect, Twitter connect) Mail Hosting & Cloud code extension InApp Purchase Multi-plateforme SDK (iOS, OSX, Android, Unity…) REST
Backend 1/3Powerful Data Management Data creation through Relational database or KVC
Backend 2/3Advanced filtering
Backend 3/3ACL (Classe level & Object level) Data type :
String Number Boolean Array Object Date Bytes File Geoloc
Push 1/2Easy integration through the SDK Almost free Segmenting Filtering by plateform Schedule (Pro) Accessible through REST API
Push 2/2
Parse iOS SDK
Add « Parse.framework" to your project Add lib dependancies Add : [Parse setApplicationId:@"YOUR_APP_KEY" clientKey:@"YOUR_CLIENT_KEY"];
Installation
Model 1/3
Saving objects
PFObject class
Saving Objects Offline
Model 2/3
Arrays
Retrieving objects exemple
Model 3/3Delete Counter PFUser or PFRole, PFProduct You manipulate object extending PFObject Relationnal Data
one To Many (@"parent") Many to Many (PFRelation object)
Queries 1/2
Powerfull query system
Queries 2/2
queries with NSPredicates containsAllObjectsInArray/notContainedIn greatherThan/LessThan/lessThanOrEqualTo… relationnal queries limit x result or skip x result ordering on multiple keys compound Queries : orQueryWithSubqueries
Caching
query.cachePolicy property 6 caches configuration, including:
kPFCachePolicyCacheElseNetwork: The query first tries to load from the cache, but if that fails, it loads results from the network. If neither cache nor network succeed, there is a PFError.
kPFCachePolicyCacheThenNetwork: The query first loads from the cache, then loads from the network. In this case, the callback will actually be called twice - first with the cached results, then with the network results. Since it returns two results at different times, this cache policy cannot be used synchronously with findObjects.
FilePFFile class
saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) progressBlock:^(int percentDone)
getDataInBackgroundWithBlock:^(BOOL succeeded, NSError *error) progressBlock:^(int percentDone)
GeopointsPFGeoPoint class
[PFGeoPoint geoPointWithLatitude:37.7 longitude:-122.5];
Helpers:
geoPointWithLocation:(CLLocation)
geoPointForCurrentLocationInBackground:^(PFGeoPoint *geoPoint, NSError *error);
Geo Queries:
[query whereKey:@"location" nearGeoPoint:userGeoPoint];
whereKey:nearGeoPoint:withinKilometers
Social & sign-in
Easy authentication with :
Facebook based on FB SDK
Login/pwd
Helpers & feature on PFUser
User interface
Parse provides a few subclasses of UIViewController that make logging in/signing up PFUsers, and displaying PFObjects significantly easier.
User interface 1/3PFLogInViewController & PFSignUpViewController
User interface 2/3
PFQueryTableViewController Pagination with a cell that can be tapped to load the next page. Pull-to-refresh table view header. Loading screen Offline message support PFTableViewCell for image listing
User interface 3/3PFImageView
Cachine image in memory & disk
Pricing & performancesBasic plan - free
1 million request/month + 7¢ per 1,000 over
1 million pushes/month + 7¢ per 1,000 over
20 request/second
1gb + 20¢ per 1GB over
Pro plan - 199$/month
15 million request/month + 5¢ per 1,000 over
5 million pushes/month + 5¢ per 1,000 over
40 request/second
10gb + 15¢ per 1GB over
Custom domain name & mail branding
Push mutliple certificate, push targeting, scheduling
More app&push metrics
Collaborators
+1 background jobs
Pricing & performances
Transparent pricing For which kind of project & company size ? Bought by Facebook in april 2013 Your data are free
Learn moreMuch more to explore
Cloud Code & beforeSave/afterSave Cloud Code modules (ParseImage, SendGrid, Underscore…) Rest API Background job Great documentation Check tutorials https://www.parse.com/tutorials
CocoaHeads Parisparse.com
Nicolas Lauquin @nlauquin [email protected] www.atelierdumobile.com
Top Related