The open-source Parse SDKs are flexible and easy to use, a community of developers is keeping them up to date, check the official Hub here: parseplatform.org.
Parse Server is a great choice for building applications and websites that need a flexible backend that can be managed with a few lines of code.
You can host Parse Server in your own server. Anyway, the process to do that is pretty complex, so here’s where back4app comes out to help you. It is a valid BaaS for hosting your Parse apps for free – for test purposes. It also offers affordable subscription plans to get more database storage, API calls, and higher speed performance. Check out the Pricing page to get an idea of the offered plans.
Setup and create a database
Creating a Parse App on back4app and its relative database is super easy. First of all, sign up for a new account, it’s free. After signing up, the browser will redirect you to the Main Dashboard, where you can build and manage your own Parse Apps.
In order to create a new Parse App, you can either click the Build new app blue big button or the green NEW APP one on the top-right corner of the page. Enter the name of your app, as well as an optional description.
Click Create to enter the main Dashboard, where you can manage apps settings, upgrade to a paid plan or enter their Parse Dashboards.
Let’s get deeper into the Server Settings of an app. Click the Server Settings button and get to the App Dashboard
The App Dashboard
This section is where you manage your keys, delete, transfer, clone or restart your app. If you click LEARN then you’ll be redirected to the official documentation of back4app. If you select SETTINGS, you’ll get into the server options:
Here you can grab all those keys you need to use in your mobile or web applications in order to run Parse SDKs.
Scroll down to the bottom of this page to find a few buttons to edit the details of your app, restart it, transfer it to another back4app owner clone or delete your app.
Manage Parse Server
In this section, you can change the Parse Server version. Click the SETTINGS button to enter a list of Parse Server versions and choose the one you want.
Click on SETTINGS to enter a page that shows all your server’s Log data.
For instance, in case your app needs to send Push Notifications, you need to create a
main.js file with functions to handle Push Notifications and upload it to this container.
Command Line Tool
Click LEARN to read the documentation that explains how to interact with you Cloud Code from the Terminal.
.js file must be uploaded to your Cloud Code container. It’s also known as CronJob in a classic hosting’s cPanel.
You can read the documentation by clicking LEARN.
Click SETTINGS to schedule and run your own Background job.
Web Hosting and Live Query
In this section, you can create a webpage hosted on back4app.io and activate Live Query.
Read the documentation to learn how to enable Web Hosting by clicking the LEARN button. Click SETTINGS to configure a subdomain and activate Live Query.
Here you can enable verification emails for users who sign up in your app. The server will send an automatic email with a link to click in order to send the
emailVerified field as
True in your own Parse Dashboard, this is useful in case you want to allow users to use your application only if they verify their email address.
You can set the
Reply-to address, the subject and body of your verification email and edit the details about the
Password reset email as well.
This is the section where you have to paste your own
Facebook App ID in order to allow users to sign up/log in with their Facebook accounts in your applications. You can create an App on your Facebook Developer page and grab the
App ID from there.
Click SETTINGS to enter the editor page and add your
Facebook App ID. Click LEARN to read how to implement Facebook login in your app.
Twitter Consumer and
Secret Consumer keys that you can obtain from your Twitter Developer account in this section.
Click SETTINGS to add your keys and enable Twitter login for your application.
Android Push Notifications
In case your application is an Android one, click SETTINGS and paste your own
GCM Sender ID and
API Key in their relative boxes, then click NEXTto save them.
iOS Push Notifications
If you are building an iOS app, you need to first generate your
.p12 Development and Production Certificates for Push Notifications in the Apple Developer Portal, then click SETTINGS to upload both certificates and enable back4app to handle Push Notifications in your app.
The Parse Dashboard
Let’s explore the awesome Parse Dashboard now. This is the database where your data will be stored and you can edit them as you wish. It’s kinda working on an Excel file since Parse Server is based on Node.js – no MySQL involved – so it’s pretty easy to get stuff done with the Parse Dashboard.
From the top navbar, click on Dashboard. The browser will load the page with a list of your Parse Apps. If you’re reading this article for the first time and have created an App – as mentioned in the beginning – you’ll obviously see one app only. Anyway, this is how the Parse Dashboard’s home page looks like:
Click on the app’s row to enter its Dashboard. By default, the Role and User classes will be automatically created, check them out from the left-side menu.
Let’s add a new user in the User class, we’ll do that manually just to get familiar with the Dashboard’s commands and UI. When you add a user, the mandatory data are username and password. So you can add a row in your database in 3 ways:
- Click the Add row blue button in the middle of the page
- Click the Add row custom button on the top-right corner
- Click the Edit button on the top-right corner of the screen and then Add a row
After you’ve created a new row, just double-click into the cell of the
username column and type johndoe. Then double-click on the cell of the
password column and type a password. Lastly, you may also add an email address in the cell of the
Let’s now create a Column, you have 2 ways to do that:
- Click the Add column button on the top-right corner of the screen
- Click the Edit button -> Add a column link
A popup will appear, you have to choose the type of data you want to create and type a name for it.
You can create the following data types:
- String – a field that stores strings
- Boolean – either True or False
- Number – a float or integer number
- Date – any date
- Array – usually an array of Strings. Its syntax looks like
- GeoPoint – Latitude and Longitude values, something like
12.123456789 | -74.123456789
- Polygon – another way to store Latitude and Longitude values, in a JSON format that looks like
[ [ "12.123456789", "-74.123456789" ] ]
- File – any file (images, videos, PDF files, etc.)
- Pointer – a link to a row from another Class of the database
- Relation – a relation to another Class
What about creating a Class? You have 2 ways to do that as well:
- Click the Create a class button on the left menu
- Click Edit -> Add a class
Another popup will show up. By default, it shows the Custom type class – keep that, we don’t need to deal with the other existing classes – and an empty field where to type its name.
Products and click the Create class button. The page will refresh and show your brand new Class, its name on the left menu and the default, undeletable columns.
When you add a row, either via a mobile or web code or manually in the Parse Dashboard, the following columns get automatically generated:
- objectId – a unique row’s identifier
- createdAt – the date you’ve created a row
- updatedAt – the date you’ve updated a row
- ACL – the Access Contro List for a user
Let’s now add a Column to our Products class, a
String type, and call it name. Then click the Add column button.
At this point, you can add a new row, double-click in the cell of the name column and type whatever you want, something like Shoes, for instance. When you hit Enter, you’ll get something like this:
I want to explain to you what the other Parse Dashboard’s commands are about, check the following Toolbar:
- Add a row button
- Add a column button
- Refresh a Class data
- Open a Class Index Manager
- Search filter for the database
- Edit Class Level Permissions
- Edit button
If you want to get into more info about those functions and the back4app’s environment, check out the official Documentation here: https://www.back4app.com/docs/platform/get-started/backend-as-a-service
One more thing before ending this article, you are allowed to add a collaborator to your database, like a developer who will have access to your database and can edit data while working on it (for instance, when he’s building an app for you using the Parse Server SDKs).
From the left menu, click the App Settings link:
You’ll be redirected to a page where there’s a Collaborators section and an empty filed. Type or paste your collaborator’s email address, click the ADD button and the Save Changes button on the bottom of the screen.
PLEASE NOTE that if your Collaborator must have a free account on back4app
That’s all for this tutorial, you have learned a lot about the main features and options of Parse Server hosted on back4app.
Hope you enjoyed this article, feel free to post comments about it.