Video Tutorials on Getting Started

Here at Parse, we love to make things easier. We’re creating a service that will make backend development a thing of the past for mobile developers. And everyday, we’re adding new features to make Parse more powerful, allowing you to implement your ideas into mobile apps more quickly.

However, there’s no use in creating features for a platform if it’s hard to get started. To that end, we’ve spent a lot of time honing our QuickStart guide so that developers can easily get started and learn our platform.

Today, we’ve added 2 video tutorials on getting started with a new iOS and Android app using Parse. Sometimes, it’s just clearer what the steps are if you’re watching over someone’s shoulder. Here they are:

You can also find these videos in the QuickStart guide.

And this is only the beginning. Our goal is to create rich resources like video tutorials to help you understand Parse better. If you have any requests for specific tutorials, please reach out.

James Yu
November 30, 2011

Performance and Security Improvements

One of our goals is that the Parse infrastructure should work more efficiently and reliably than when every app developer builds their own. One example is the networking layer of your application. It’s easy to assume that every HTTP request works alike, but there are actually many details around edge conditions on mobile networks, request pipelining, and error handling that can be tweaked for better performance. If you use Parse, we do this tuning for you.

Along these lines, today we’re releasing version 0.4 of the Parse SDK for iOS and Android which has several networking and security improvements. You should be able to drop in the new version of the Parse library and have your existing code run faster, so we encourage everyone to upgrade.

Also in this release, we have extended the client SDKs to provide access control lists, or ACLs, which make it easier to build secure applications. In conjunction with PFUser or ParseUser, you can use ACLs to secure objects so that access is restricted to a specific set of users. Read more about it at the iOS ACL documentation or the Android ACL documentation.

We’re always eager to get feedback from developers who are interested in Parse. If there are things we should be doing that we should know about, let us know!.

Thanks for using Parse!

Kevin Lacker
November 29, 2011

User Management in the REST API

As the mobile ecosystem expands, more and more developers are building “Mobile first, web second” – building what is foremost a mobile app, but also building a web interface for it. One of the pains in mobile development today is building user accounts that can be accessed conveniently from mobile devices but also from any other system.

To help solve this problem, Parse has just extended the REST API to work with users. The same logIn and signUp commands that work in our client SDKs now have analogous HTTP endpoints, at /1/login and /1/users. You can also store arbitrary per-user data in the same ways that the client SDKs make possible.

The REST API for users also enables quick one-off analytics of your user base. For example, if you track the user’s area code in the user object and you wanted to check how many of your users are from San Francisco:

curl --user $APPLICATION_ID:$MASTER_KEY 
  -X GET 
  -G 
  --data-urlencode 'where={"areaCode": 415}' 
  --data-urlencode 'count=1' 
  --data-urlencode 'limit=0' 

https://api.parse.com/1/users

There are plenty of other things you can do with the REST API. Read more about it at the REST API documentation.

Our goal is that any mobile app you can build if you build your own server, it should be easier to do it with Parse. We’re always trying to bring Parse closer to this vision, and your feedback helps teach us how to do it. If you have tips, suggestions, or bug reports, please let us know.

Thanks!

Kevin Lacker
November 8, 2011

New Tricks With Queries

We want data access via Parse to be fast and easy, no matter what sort of data you’re storing. Recently we’ve launched a few new features to help you access your data in different ways.

Often you want to run multiple queries that differ in only the value of one parameter. For example, you might want to download song information for any one of a list of artists. Rather than issue separate queries for each artist, you can now grab all of that information with one query, using whereKey:containedIn:

// We want to get information for any of these artists
NSArray *artists = [NSArray arrayWithObjects:@"The Beatles",
                                             @"Them Crooked Vultures",
                                             @"Freezepop',
                                             nil];

PFQuery *query = [PFQuery queryWithClassName:@"SongInfo"];
[query whereKey:@"artist" containedIn:artists];

[query findObjectsInBackgroundWithBlock:^(NSArray *songs, NSError *error) {
  // songs now contains SongInfo for any of the provided artists
}];

Another pattern we’ve noticed is that sometimes you want to run a query only because you’re interesting in counting the results. This introduces the overhead of sending the results when it isn’t really necessary. To make this faster, we’ve introduced countObjects methods, similar to the findObjects methods.

In our SongInfo example, if you’d like to count how many songs there are by The Beatles:

// Construct a query
PFQuery *query = [PFQuery queryWithClassName:@"SongInfo"];
[query whereKey:@"artist" equalTo:@"The Beatles"];

// Use countObjects instead of findObjects
[query countObjectsInBackgroundWithBlock:^(int count, NSError *error) {
  // count tells you how many objects matched the query
}];

Sometimes you want to page through data rather than access it all at once. For example, you might want to grab ten songs, and then another ten if the user swipes to see more. You can use query.skip and query.limit to control which results to retrieve. For example, to get the 51st through 100th most recent Beatles songs:

// Query for Beatles songs, most-recent-first
PFQuery *query = [PFQuery queryWithClassName:@"SongInfo"];
[query whereKey:@"artist" equalTo:@"The Beatles"];
[query orderByDescending:@"createdAt"];

// Skip the first 50, retrieve the next 50
query.skip = 50;
query.limit = 50;

[query findObjectsInBackgroundWithBlock:^(NSArray *songs, NSError *error) {
  // Now you have the 51st through 100th most recent Beatles songs
}];

Check out the iOS query documentation for more on what you can do with the PFQuery. If you’re working on Android, all of this functionality is available to you as well. Just check out the Android query documentation.

We’re always trying to make Parse easier and to make more things possible using Parse. Your feedback is the fuel that keeps this engine running. So please, don’t hesitate to send us feedback.

Thanks for reading!

Kevin Lacker
November 4, 2011

Archives

Categories

RSS Feed Follow us Like us