If you're a mobile developer, you may be wondering how to manage user data in your next app. Should you use a database, a dedicated server, or maybe you can manage only with a front-end? This article will help you make a better decision.
1. What Is Back-End?
Before we dive into the details of available service, let's get some terminology out of the way.
For mobile and web apps, we often talk about the front- and back-ends. While the front-end defines the user interface, user interaction, and presentation of information, the back-end handles the business logic, data storage, and security. The front-end is the users' web browser or mobile device, and the back-end is the server or servers where data is stored and shared.
A growing number of modern mobile apps rely on at least a few features that require a back-end. User and usage analytics, push notifications, extended security, user-to-user communication (in multiplayer games or messaging apps, for example) and monetizing the app through advertisements are the most common examples.
2. Who Develops It?
From a mobile developer's point of view, the back-end seems to be a whole other world, populated with databases and servers. So not only are developers expected to create beautiful and performant mobile interfaces, they must also be knowledgeable about network infrastructure such as web servers, database management software, server-side-scripting languages and a lot more.
Furthermore, they're expected to be experts on modern cryptography and computer security, big data and data mining, mobile telecommunication networks (mobile apps mostly run on smart phones connected to a mobile telephone network) and an ever growing list of additional technologies.
Naturally, it follows that, even to develop a simple mobile app with a back-end, the developer needs to master many tools and languages that are outside the scope of ordinary app development. Surely, this situation discourages a lot of developers from integrating a back-end into their apps.
3. Back-End as a Service (BaaS) to the Rescue
With cloud computing absorbed into the mainstream, XaaS (meaning BaaS, SaaS, PaaS, etc.—Back-End as a Service, Software as a Service or Platform as a Service) has already started to redefine the way software is developed, published, and consumed.
The basic idea is similar to having your back-end development, maintenance and management outsourced to another party. In other words, the back-end is made available to developers as a web service.
While different BaaS providers offer diverse features through a large variety of pricing models, most of them use some kind of "freemium" model. This means core features such as data storage, user/usage analytics, push notifications, and authentication are provided free of charge up to a certain usage limit. Once the usage exceeds that limit or additional features are requested, a fee is charged. This makes it easy to create and launch an app at the free usage tier, and then to scale up to a paid tier as you add customers.
Normally the developer needs to use the SDKs and APIs of the BaaS provider to connect their app to the back-end.
4. Pros & Cons of BaaS
The biggest advantage of BaaS is that it frees developers from the burden of building and managing back-ends themselves. That allows the developer to concentrate on more important stuff, such as designing a compelling user experience, which will be the actual success factors of the app. Also, it helps the developer avoid steep learning curves typically associated with most back-end technologies. So it cuts the cost and the development time. It also provides a cheap way of experimenting with app ideas and seeing how they perform in the real world.
As with anything else, BaaS has some tradeoffs. The biggest downside is the danger that your BaaS provider might suddenly go out of business and close down the service. In such a scenario, even if you switch to another provider, you may need to substantially redesign and recode your app, because the new service might have a completely different API. Actually, one of the most popular BaaS providers, Parse, recently closed, which has affected a lot of developers (though the Parse infrastructure was released under an open-source licence, and new vendors have sprung up to provide a Parse-compatible BaaS).
Another downside is that customization of back-end infrastructure in a BaaS is often limited. That might mean that some functionality you want for your app is not available.
5. How to Choose a BaaS Provider?
There are several questions you need to ask yourself about each BaaS provider, before selecting one for your mobile app.
The first question is whether the provider can fulfill your app's needs. It's worth mentioning that sometimes, redefining the scope of your app to match the features offered by a BaaS provider can give you really amazing results. But don't give up the features that give your app its uniqueness and appeal!
Most BaaS providers offer their services, free of charge, only up to a certain point. This limiting point is usually defined by something like the number of API calls, number of active users, or a similar parameter. Sometimes, it can be very difficult for the developer to forecast the amount of usage or the number of users of the app. So it's quite possible to end up with a platform which is not profitable for the developer.
Check this in advance by projecting the cost and revenue for a range of possible values that correspond to the usage or the number of users. Then, you can see how much of the app's revenue would go to BaaS fees and adjust your revenue model if need be. Alternatively, the developer can look for a BaaS provider whose pricing model best matches the app's revenue model.
Because there are limits to customization, some apps might be hard or impossible to develop with some of the off-the-shelf BaaS offerings. Interestingly, some BaaS providers offer more specialized features targeting a specific app category, such as games. If your app falls into such a category, there's a bigger chance that the required feature is supported by such a provider. You need to do a bit of research about BaaS providers who target your specific app category.
The developer also needs to consider the lifecycle of the app. The longer the life of the app, the higher the cost of sticking with the BaaS provider. For an app that will be around for a long time, it might be worth investing in creating your own back-end.
6. Popular BaaS Providers
Now that we have some insights into BaaS from both a developer's and an app startup founder's point of view, let's look at some of the popular BaaS packages and their features. While the industry is dominated by the commercial providers, a set of aspiring open-source providers also seem to be on the rise.
Firebase
Google's BaaS platform, Firebase, offers an extensive list of features categorized under three stages, namely Develop, Earn, and Grow. The Develop stage consists of real-time databases, authentication, cloud messaging, storage, hosting, test lab (for testing apps on a device), and crash reporting. Being a commercial provider, it has also integrated its AdMob platform for monetizing your app. Further on the path to growth, you'll find the features such as App Indexing, AdWords, Notifications and a lot more.
Because it is from Google, the creator of Android, Firebase is usually seen as an Android platform. However, the Firebase SDK is also available for iOS.
Here on Envato Tuts+, we have a number of tutorials and courses to help you get started with Firebase. Check them out!
Get Started With Firebase for Android
Creating a back-end server requires a skill set that most independent app developers lack. Fortunately, there's Firebase, a cloud-based platform that...
Ashraff Hathibelagal
30 Sep 2016
Android SDK
How to Create an Android Chat App Using Firebase
With Firebase, creating real-time social applications is a walk in the park. And the best thing about it is that you don't have to write a single line of...
Ashraff Hathibelagal
27 Oct 2016
Android SDK
Use Firebase as the Back-End
Firebase is a technology that allows us to create web apps without any server-side programming, so that development becomes quicker and easier. With...
Reginald Dawson
31 Mar 2016
JavaScript
Firebase Security Rules
Firebase Database security rules are how you secure your data from unauthorised access and protect your data structure. In this quick tip tutorial, I'll show...
Chike Mgbemena
10 Jan 2017
Mobile Development
AWS
Another commercial provider, Amazon Web Services (AWS), was one of the first PaaS providers. It boasts a rich set of cloud services and accompanying tools, with control, if you want it, over every aspect of your virtual servers. In fact, many other cloud service providers use AWS behind the scenes.
All this power comes with a cost, though—AWS has a much steeper learning curve than other BaaS providers. Features include mobile SDKs, email and SMS notifications, app analytics, and the Device Farm for testing your app on various mobile devices.
Cloud Services
Explore Amazon Web Services
Markus Mühlberger
Quiz
Quiz: Amazon Web Services, Do You Know the Right Tool for the Job?
Adam Brown
Amazon App Store
How to Migrate to Amazon In-App Purchasing From Google's
Jeff Reifman
Back4App (Parse SDK)
Parse was a popular BaaS platform, but unfortunately Facebook has decided to shut it down. But don't worry that the Parse SDK will die! Facebook retired the parse.com hosting service in January 2017, but the Parse SDK has been made open source. Parse SDK has lots of great developers working on it, and there are a number of brand new websites that offer back-end hosting as a service.
One of the best is Back4App. It has a free tier with a generous storage and requests budget, as well as APIs for Android and iOS.
iOS SDK
Host a Parse SDK Backend for Your iOS App on back{4}app
Francesco Franchini
Mesosfer
Introducing its highly elastic BaaS, Mesosfer is a commercial provider with interesting features that supports mobile, web and even IoT embedded apps.
BaasBox
Unlike the previous members on this list, BaasBox is an open-source BaaS provider. The developer and API usage statistics displayed on their website suggest a competitive and capable provider, comparable with the commercial providers.
Apache Usergrid
Another open-source BaaS is Apache Usergrid (from the creator of the popular web server). Usergrid supports running on traditional server infrastructure, enabling you to deploy your own BaaS platform. Features include user management, file and data storage plus retrieval.
Apple CloudKit
Apple introduced their CloudKit framework alongside iOS 8 in 2014. While its main purpose was to act as an online database for iOS applications, CloudKit also offers many other features, including push notifications. One of the best things about CloudKit for some developers is how much you get for free. For example, with CloudKit, there is no limit on the number of push notifications you can send to your users.
However, a disadvantage you should be aware of when using CloudKit is that it is not currently available on any non-Apple platforms. That means that if you want to create an Android version of your app, CloudKit won't work!
iOS 8
An Introduction to CloudKit
Davis Allie
iOS SDK
How to Use Apple's CloudKit for Push Notifications
Davis Allie
7. Conclusion
BaaS is a practical and timely solution to the problem of adding a back-end to your mobile apps. It also helps the developer direct their own limited time in the best possible way. There are a growing number of BaaS providers out there, and now you know how to make use of them!