Blog

Thoughts on mobile app development.

Are you using Parse yet?

As an iOS developer who finds creating databases and web services incredibly boring, Parse has always sounded very attractive. For those who don’t know, Parse provides a way for developers to store data in the cloud. They offer a number of other services as well, such as push notifications, cloud-based code, and social integration, but I believe data storage has always been their core business. There’s no databases to setup, no web services to create, no servers to maintain – all you need to do is focus on creating a great front-end product, and they do the rest. At least, that’s what I was expecting without ever having used it before.

I finally had a chance to play with Parse this week, and I was very pleased to find out that Parse lived up to my expectations, and more. It’s incredibly simple to setup and develop for, and I’m now falling over myself to try and find more projects to use with it. Here’s a few of the things that really impressed me.

Simplicity
Storing and retrieving data is drop-dead simple. Here’s an example from their documentation:
[code]PFObject *gameScore = [PFObject objectWithClassName:@"GameScore"];
[gameScore setObject:[NSNumber numberWithInt:1337] forKey:@"score"];
[gameScore setObject:@"Sean Plott" forKey:@"playerName"];
[gameScore setObject:[NSNumber numberWithBool:NO] forKey:@"cheatMode"];
[gameScore saveInBackground];[/code]
And…we’re done, the object is now stored on Parse’s servers. No tables had to be created, no columns had to be defined. There’s several ways you can save data too, including block-based completion callbacks, and even the ability to automatically save later in case the network connection is down.

Retrieving data is just as easy:
[code]PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
[query getObjectInBackgroundWithId:@"xWMyZ4YEGZ" block:^(PFObject *gameScore, NSError *error) {
// Do something with the returned PFObject in the gameScore variable.
NSLog(@"%@", gameScore);
}];[/code]

Documentation
This has to be one of the biggest reasons why I’ve fallen in love with Parse. The documentation is first-class. Plenty of code samples, plenty of sample projects, clear and concise explanations. It doesn’t get any better than this.

Data Browser
If you want to take a look at what data you have online, Parse provides a Data Browser. This works somewhat like a spreadsheet. You can view all your data, update and edit as you need, and it all just works. Your data is very much open and visible to you, which makes debugging much simpler. I think it could also be great as a lightweight CMS.

So why shouldn’t you use Parse? There’s a few reasons I can think of:

  • You don’t own the data. If Parse disappears one day, it’s going to cause problems.
  • It doesn’t replace a full CMS, so might not always be suitable
  • Parse was recently acquired by Facebook, so I guess it remains to be seen exactly what the future holds

For me, the positives far outweigh the negatives. If you’ve never tried Parse, it’s well worth the effort to spend an hour taking a look. My only regret is that I didn’t look into it sooner.

3 Comments

  1. I love parse. I have been switching over everything from GoogleAppEngine over to parse. I run more the a million transactions per month so I have to pay a little bit, but the time savings is a huge plus for me.

    Reply
  2. Ben, great post, looks like a great platform. Forgive me for asking a stupid question, the answer wasn’t obvious to me from their website.. but does the data live on the device and sync with the cloud or does it live only in the cloud? In other words will it work in Airplane mode?

    Thanks again

    Lewis

    Reply
    • The data lives in the cloud, so if you need some sort of syncing mechanism, you’ll need to handle it yourself. There’s some 3rd party options around for syncing, but nothing official from Parse.

      Reply

Leave a Reply to Tod Cunningham Cancel reply

Your email address will not be published. Required fields are marked *