Parse the salt please

After playing a lot with Parse over the last few weeks I thought I’d share some of my findings.

Getting to know Parse

Just what is Parse? a question I even asked myself until I really started to look behind the covers. If you just look at the homepage you’ll likely be left scraping your head and thinking it’s some sort of creative design helper or some “powerful backend provider” to accelerate your apps (seriously??)

In short parse is a cloud based database system with a load of tools / frameworks thrown in and by far the lowest barrier to entry data provider I have seen.

There is a lot more to Parse than just that, but at its core it’s there to help you share data or act as a cloud based data repository. What also makes it great is that it has the largest platform I’ve seen to date, just about every provider has their own SDK and to top it off there is even a HTML/Javascript client and a full REST API.

Here’s what the detailed info has to say about Parse’s components:

Parse Data

Store your app’s data in the cloud. No servers necessary.

Basically your spreadsheet in the sky. It is a database system but as you’ll see below it’ capabilities are limited. However it is like this for a reason, to be the most powerful yet simplistic data storage and retrieval system out there.

Coupled with a very powerful web based GUI to help you manage you backend store to boot.

Parse Push

Basically everything you would expect from Push notifications but scaled to support all its providers and advanced scheduling features with specific targeting capabilities.

Parse Social

Make your app social. Instantly.

All this really means is that Parse supports several OS third party libraries for Social connections and the ability to understand how those work.

Really this is the smartest thing they could have done instead of building their own, we are in a worldwide community after all.

Parse Hosting

A powerful web presence without all the hassle.

Web page hosting, would you really expect anything less, note just like its competitors expect to pay more for custom domains.

Cloud Code

Run custom app code in the Parse Cloud. Say goodbye to servers.

This feature is more targeted at hybrid and web apps, offering the capability to host and run Javascript code from the back end.

It is very similar to Azure’s custom API to build dynamic code if you are familiar with that but not as full featured.

Getting started with Parse

As you will find with Parse, everything is built from an understanding that EVERYTHING should be as simple as humanly possible, especially the site setup and getting started features.

Walking through, once you have signed up and reach the dashboard, just watch how simple setting up a new app is:

Give your app a name

Done, your app is setup (say wahhh),

Clicking on the “Quick Start Guide” leads you in to information to get your app up and running, whether it’s an existing app or brand new

Selecting “New App” gives you a readymade app preconfigured for your service, just uncomment the start-up point to enable Parse.

Selecting “Existing App” gives you all the instructions you need to install the SDK (Windows versions are all on NuGet) and the code specific to you app to get it connected.

There are also some steps for testing your app and its connection with some dummy data if you are new to this.

Full merits to the documentation team

Once you are up and running you should head straight over to the excellent documentation support that the Parse team have put together. I’ve seen some great examples of proper documentation from teams at Telerik and Xamarin but the Parse team seem to have found that edge to make it even better. It helps of course having an API that is really simple to use and doesn’t need much explaining but they do it really well. (Although no offline docs, which is a shame when you’re on the train ;-( )

In the docs you will find everything you need to sort out:

Creating tables (done automatically when you add your first object and sync)

Reading Data

Updating and deleting data

Managing Files

Analytics

And much much more

Being a good data friend

When building for Parse the thing to keep in mind is to keep things simple. Storing data in the Parse data system is all about a dictionary system for the constructs you wish to build AND NO MORE.

As an example the following would be OK (assuming you have followed Parse’s quick start instructions):

So remember you have to keep data you store in Parse VERY simple, you can spread data over multiple tables and use relationships as Parse does understand these but remember that each interaction with the backed is another call to the service (remembering you have limited calls with Parse)

The solution I ended up using was to take my anonymous type (or object) and store its contents as a string, that way you can effectively deserialise it later if you needed it, for example:

What to watch out for

Now one other caveat with Parse I’ve found that you have to be very careful with exception handling and state tracking, in a lot of my cases simply putting a Try / Catch around Parse statements may not save you, for instance if Parse has not yet initialised or you have no Network when your client is run then the Parse Analytics will actually crash you app (at the time of writing).

My best advice is just to test your app in all situations to ensure you work as expected and keep track if Parse is connected or not.

Wrapping up

As I’ve said before Parse is by far the easiest Data Provider I’ve ever had to use and if your data is very simple then things will be ever so easy.