An Introduction to PARSE

PARSE is one of the Mobile Backend As A Service(MBaaS) provider, Which was launched in 2011. PARSE is the platform for mobile developer build on Amazon Web Services(AWS). In 2013, Facebook Acquired PARSE.

This fast-growing start up providers server management for over 180,000 Android, iOS, and Windows mobile applications, which run on more than 200 million mobile devices.

What is Parse?

Parse is MBaaS provider, Which allow mobile App developer to forget server maintenance, Push notification, Analytics, Data storage and social integration.

PARSE offers :

  1. MBaaS for Android,IOS,Windows phone and web application.
  2. Provides minimum configuration and quick start.
  3. Provides REST API and JavaScript SDK.
  4. Full stack SDK.
  5. Freemium.
  6. Documentation and tutorials.

PARSE provides different functionality for developers. These functionalities are:

  1. Data storage/File Storage
  2. Analytics
  3. Push notification
  4. User management
  5. Geolocation support
  6. Social integration(Facebook and Twitter).
  7. Cloud Code

Parse provide SDKs for devices running iOS, Android, Windows Phone, OS X and JavaScript.

How Parse?

First, You need to register on free or paid plane (https://www.parse.com) based on your needs. Download and install Parse provided SDKs. In this tutorial will guide you through to do application based on Javascript SDK. You will note that the entire application is simple static file.This is the beauty of Parse application.No need to bother about backend services.

Why Parse?

The answer of this question based on MBaaS. When we are using MBaaS, We can assure following features:

  1. Reduce the development cost.
  2. Reduce the development time.
  3. Reduce maintenance cost.
  4. Reduce Time To Market(TTM).
  5. Improve quality.
  6. Handle security.
  7. Handle App growth.

Parse assure all the above properties and it is provides rich set of SDK on multiple platform.Parse is the most popular and user friendly MBaaS service than all other service providers. Parse Development makes creation of mobile apps easier because the developer is not hampered by concerns about complicated infrastructure and server maintenance. If you want to your data accessible outside of single device then you can use parse as backend service. Parse also assure your push notification operation easily.

The main benefits of using parse is:

  • It’s easy to use, quick to set up, and is scalable.
  • It saved us on development time as well as costs.
  • The Parse system is a super-convenient and easy way to fuel our mobile apps and avoid data and social networks management hassles.

Demo with Parse

Let’s start simple application

First, sign up with free account on parse.com. After the sign up process you can create an your first App.

Step 1 : Goto link https://www.parse.com/apps, Then click create a new App button.

Figure 1

Step 2 : Enter your App name and click create button

Step 3 : Your App is ready. You can grab your keys from the link keys. These keys are very important for developing your application.

Figure 2

Your application is ready for use !

First property of Parse is Data storage. So we need to create a sample application for data storage. Here JavaScript SDK is used for this purpose.

Step 1: First create simple html file. Here the name used sample.html.The source code available here. Add New user.

In this code we include a script file for parse operation

<script type=”text/javascript” src=”http://www.parsecdn.com/js/parse-1.3.2.min.js"></script>

Within the script tag, we initialize

Parse.initialize(“YOUR APPLICATION ID”, “YOUR JAVASCRIPT ID”);

Specify your table name and it’s object. After that set all values and simply call save() function. The new table and entry will be on your application. Let’s check.

Step 2: Run you sample.html file. Fill your username and userid in to the form. just click Add button.

Step 3: The data will store in table. The new table will automatically created and new entry will be there.

Figure 3

The first property Data storage is done. We have used Access control list(ACL)for authorization purpose. So there is no security issue will generate. JavaScript SDK provides rich set of query function for different database operation.

The second feature of Parse is Cloud Code.

Let’s check with cloud code operation provided by parse.

We don’t worry about server side. Parse will do all parts. is it? yes. Cloud code guide you to more closer on this concept. The codes are running on parse cloud code not in your mobile device. When you update your code that should be instantly available on all mobile devices.

First you need to install parse’s command Line Tool. The parse command Line Tool for windows available here. Download into your local system.

Step 1 : Run Parse Console .

Step 2 : Type the command Parse new yourCloudCode.

Step 3 : Use your Parse Email, Password and choose an application.

Step 4 : change to cloud code directory. cd yourCloudCode.

The folder structure is as follows.

Figure 4

Your Cloud directory stores your cloud code. The public directory stores all the static content.

Let’s play with small javascript code.

First we need to compose small javascript code into cloud/main.js. Traditional Hello World program.

Parse.Cloud.define(“parsework”, function(request, response) {
response.success(“Hello world!”);
});

Next, you need to deploy your code, that is also done with very small parse command.

$ parse deploy

Then you can create a small javascript file sample.js. Compose this file with following code

Parse.initialize(“xxxxxxx”, “xxxxxxxx”);
Parse.Cloud.run(‘hello’, {}, {
success: function(result) {
console.log(‘Hello world!’);
},
error: function(error) {
}
});

Then run sample.js. The result should be Hello world on your console. We can pass parameter through this function.

The third main feature is Analytics.

It is very important to know what is your App doing, How frequently your App is accessing etc. Parse analytics provides beautiful dashboard to tracking your App. Thee different type of tracking mechanism like Audience, Events, Data and Retention are available. The parse also offers Custom Analytics for App owner.

Figure 5

There are many more feature are available in parse. You can read from official parse document site.

JavaScript SDK isn't supporting push notification yet. We hope later it will be the part of JavaScript SDK also.

Conclusion

Parse offer MBaaS for mobile application. It is on growing stage. In future, It should make revolution in mobile world.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.