Review: Parse delivers on mobile apps, but not for business
Facebook's MBaaS shines for consumer mobile applications, but misses some must-haves for business apps
-
Parse
MBaaS reviews
- Review: Appcelerator is a mobile cloud...
- Review: Kinvey boosts enterprise mobile...
- Review: FeedHenry uses Node.js to...
- Review: Parse delivers on mobile apps,...
- Review: AnyPresence aces enterprise...
Parse was once the poster child for mobile back end as a service (MBaaS), and despite its recent acquisition by Facebook, it is still a viable, low-friction MBaaS for limited-volume consumer apps. On the plus side, it is well documented, it has good native client support, and it has a JavaScript client SDK based on Backbone.js. Parse also runs JavaScript code on the back end, which offers developers the option of an all-JavaScript application stack.
On the minus side, Parse is missing big pieces that are necessary for business apps, such as data integration, offline operation, and online/offline synchronization. At the same time, its pricing seems geared to lower-volume apps. If you happen to create the next viral hit, Parse will cost you plenty as the usage of your app picks up.
Client support
Parse supports native mobile, JavaScript, and desktop apps. On the mobile side, it has native support for iOS, Android, and Windows Phone 8. On the desktop, it supports OS X and Windows 8 (.Net), as well as Unity games.
The Parse JavaScript SDK is based on the Backbone.js framework. According to the company, most existing Backbone.js apps can work with Parse, pending only minor changes. Parse also has a REST API, which can be made to work on almost any client, in any language that supports HTTP requests, including the Curl command-line utility.
In addition to its own official client API libraries, Parse has a number of third-party, community-supported client libraries. These include support for .Net, ActionScript, Appcelerator Titanium, Clojure, Corona, Java, additional JavaScript APIs, Temboo, PHP, Python, Qt, RealBasic, Ruby, and WebOS.
A Parse Cloud application log viewed in the Parse Dashboard. The same information can be viewed from the command-line interface.
Cloud code
Parse lets you run JavaScript code in the cloud, using the same Parse JavaScript SDK as its client, which is based on the Backbone.js framework. Rather than have you routinely edit your cloud code in a browser, à la FeedHenry and Kinvey, Parse supplies a command-line tool for managing code in Parse Cloud and allows you to use your favorite JavaScript editor on your computer. However, you can view your code in your Dashboard, which is also where you can view your logs.
On OS X and Linux, a single tool, called Parse, installs to /usr/local/bin/parse. On Windows, the Parse tool installs a ParseConsole, which launches a Parse-aware PowerShell session; the first session adds Parse to PowerShell for future use. The command-line tool Parse is an app scaffold generator, app deployment tool, log printer, app rollback tool, and self-updater.
Your cloud code resides in main.js
after running parse new
. The default is a “hello, world” program:
Parse.Cloud.define("hello", function(request, response) {
response.success("Hello world!");
});
You can push this to the cloud with parse deploy
. Once it has successfully deployed, you can use any Parse client to run it, including a simple REST call. The tutorial in your Parse Web console will generate sample code for you with the correct credentials in several languages. Here’s the Python version with my credentials obscured:
importjson,httplib
connection = httplib.HTTPSConnection('api.parse.com', 443)
connection.connect()
connection.request('POST', '/1/functions/hello', json.dumps({
}), {
"X-Parse-Application-Id": "TRZxxxxxx",
"X-Parse-REST-API-Key": "Ajyetxxxxxx",
"Content-Type": "application/json"
})
result = json.loads(connection.getresponse().read())
print result
“Hello, world” does nothing but demonstrate that you can call code in the Parse Cloud, but Cloud functions can be useful if you pass them parameters and have them do database lookups and calculations on the data. If you need to do more complicated tasks, you’ll probably want to break your application up into multiple .JSfiles and load them from
main.js
using require()
statements.
Parse Cloud code is written in JavaScript. Here we see version 2 of “Hello” in the Parse Dashboard, as uploaded from my computer.
Key/value storage
Key/value pair storage in the Parse cloud is simple to use. The details vary with the client SDK, but this Java code for Android is typical:
ParseObject testObject = newParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
The resulting data can be retrieved from any app with access to the data and viewed in the Parse Dashboard.
You can define Parse.Cloud.beforeSave
handler functions to perform server-side data validation, and possibly apply data-modification rules, such as restricting the length of strings or removing forbidden characters. To take actions after data has been saved, define Parse.Cloud.afterSave
handler functions. Similarly, you can control object deletion by handling the Parse.Cloud.beforeDelete
event, and take action after object deletion, such as logging, with a Parse.Cloud.afterDelete
handler. These event handlers have much the same flavor as Kinvey’s hook-processing functions.
Parse Cloud functions will be killed after 15 seconds of wall clock time. The beforeSave
, afterSave
, beforeDelete
, and afterDelete
functions will be killed after three seconds of runtime. To get around these limits, you can define a background job, Parse.Cloud.job
. Background jobs are terminated after 15 minutes of runtime. You can schedule background jobs from your Parse Dashboard.
Standard Parse Cloud functions take parameters in JSON. If you need to use a different format, you can write custom Webhooks and call the Express Web application framework to process input.
Parse uses a NoSQL data store, but it supports relationships: one to one, one to many, and many to many. These can be implemented with pointers, arrays, Parse relations, and join tables. Parse supports nine simple data types, including null, and a given column can be any data type when first stored. However, Parse will lock the type of that field to the initial type after the first value has been stored. There are two ways to store binary data in Parse: as a byte stream or as a file.
The Parse Cloud data browser lets you import bulk data; add classes, columns, and rows; and view filtered data.
Push notifications
Parse can send push notifications to iOS, Android, Windows 8, and Windows Phone 8. In each case, you’ll have to provision your push server, then provide the certificate or credentials to your app. For iOS, you need to provision on the Apple Developer site. For Android, you use Google Cloud Messaging where supported by the device; otherwise the messages come from the Parse server. Windows RT and Windows Phone apps can receive push notifications from Microsoft push servers. A JavaScript client can’t receive push notifications.
Users and roles
Parse has a fairly complete user system predefined, including the usual sign-up and email verification, along with a provision for anonymous users. A system of ACLs controls what data individual users can read and write. For more complicated use cases, Parse supports roles, with a separate layer of ACLs for the roles and a hierarchy of roles.
Not surprisingly, given that Parse belongs to Facebook, it has good support for social account linking -- including Twitter. In each case, you must have an app set up on the social networking platform to enable the OAuth authentication.
Parse supports in-app purchases only on iOS. Oddly, Parse currently supports a local data store only on Android, although support for a local data store on iOS is planned.
Integrations
Parse boasts it can do double duty as a Web host. That’s nice, but it isn’t exactly a compelling consideration for choosing a mobile back-end service.
Parse has nine prefab integrations with other services. Three of them -- Mailgun, Mandrill, and SendGrid -- are for sending email. Stripe is for charging credit cards. Twilio sends SMS messages and voice messages. In addition, Parse has third-party modules for Cloudinary, Instagram, and Paymill.
As far as I can tell, implementing enterprise data integration with Parse requires writing a REST Web service wrapper for the data source and a JavaScript module for Parse. That isn’t hard, but it isn’t convenient, either. At one point, prior to the Facebook acquisition, Parse had a Web page that talked about how you could do enterprise data integration yourself. That’s gone now, and Parse isn’t even pretending to have enterprise data integration.
I haven’t seen any options for hosting Parse other than its own multitenant cloud. I can’t see it being used for apps that need to be HIPAA-compliant or for apps restricted to data located in the European Union.
Parse now has usage-based pricing, ranging from free for low usage to $1,700 per month per app for 200 requests per second, plus five centers per 1,000 unique push messaging recipients per month over the first million. That’s quite reasonable for many apps, but I can see a popular consumer app blowing through the limits, and I can’t see a large business wanting those kinds of limits for its important apps. On the other hand, vendors of successful apps and large businesses are often in a position to negotiate pricing.
While I don’t see Parse as the top MBaaS option for most businesses, I can see Parse as an easy, low-cost way to prototype the back end of a mobile app, especially a consumer app. The questions in my mind are whether it makes sense to start with a back end that lacks important capabilities that you may need later, and whether it makes sense to start with a back end that may become too expensive for an app that’s popular but not a big moneymaker.
InfoWorld Scorecard
|
Back-end services
(20%)
|
Client support
(20%)
|
Ease of use
(20%)
|
Integrations
(20%)
|
Monitoring
(10%)
|
Value
(10%)
|
Overall Score
|
---|---|---|---|---|---|---|---|
Parse | 8 | 8 | 8 | 6 | 8 | 8 |
Copyright © 2014 IDG Communications, Inc.
MBaaS reviews
Facebook's MBaaS shines for consumer mobile applications, but misses some must-haves for business...
AnyPresence combines broad client support, useful code generation, and a rich set of options for...