Stormpath vs Firebase - A Side-By-Side Comparison
Firebase and Stormpath provide the backend-as-a-service (BAAS), allowing you focus on the more fun aspects of app development.
So for example, Firebase stores data in the cloud as key-value pairs. Your app accesses this data by making API calls to Firebase.
When shopping around for these realtime, API-based databases, lots of questions will arise. It's important to find the product that will best match your app's needs.
Stormpath is plug-and-play; Firebase takes more setup time but is more flexible. Stormpath is organized around user profiles, whereas Firebase segregates the database from authorization.
Here's an example project.
Here's a todo list app made with Firebase.
The essential difference between Stormpath vs Firebase is that Stormpath is user-centric and focuses on providing authentication, and authorization, and user profile data storage. Stormpath describes itself as "authentication-as-a-service". Hence, Stormpath is focused on authentication and authorization. With Stormpath, your app's data is stored as custom profile data and therefore all data is linked to users.
One great feature is that Stormpath will send transactional emails on your behalf, which you can customize. Another perk is that Stormpath supports multitenancy and the generation of API keys for your app users.
Stomrpath charges by per API call.
Firebase is an incredibly flexible BAAS where the realtime database and authentication are dissociated from each other.
With Firebase, data is stored as key-value pairs rather than in a profile field. The barrier to entry with Stormpath is arguably lower because you can clone one of their example apps and get started. Firebase is a more flexible, full-featured solution but setup is more involved.
Firebase integrates many of Google's third party products which is pretty tantalizing. Analytics and AdMob integrations ship with Firebase.
Firebase charges by the amount of data stored and downloaded by your app's users.
Key Differences Between Stormpath vs Firebase
Firebase Realtime Database
Data is stored in key-value pairs in Firebase's realtime database.
In ReactJs, pushing data to Firebase is as simple as:
With stormpath, data is stored as custom data attached to a particular profile. This is a strength if your application data is structured around users.
Pushing data to stormpath is as easy as:
req.user.customData.favoriteColor = req.body.favoriteColor; req.user.customData.save();
This code would be executed server-side (using Express in this example).
Fetching custom data from Stormpath is also simple. Consider this ReactJs example:
You can invoke
this.context.user any time you need to fetch and manipulate user data in a ReactJs component.