What is Backend in Mobile App Development and How to Choose the Best One for your Project?
A comprehensive guide on backend mobile app development for App Owners. All you need to know about backend and choosing the right one for your mobile application.
Table of contents
xWhat is the backend of a mobile app? Do I need a backend for my mobile app? What are the different types of backend? How to choose the right backend for my mobile application development?
If you want to create a custom mobile app, you probably have similar questions and doubts about mobile app backend development. In this article, we’ve answered the most important questions on this topic. It is a comprehensive Guide on Backend Mobile App Development for App Owners.
What is the backend for a mobile app?
You can think of the backend as an additional application for your mobile app – while the latter typically works in the frontend, the backend section operates very differently. It is a piece of software that runs on remote machines called servers. It can be accessed through the internet via API (application public interface). The backend is not meant to be used by humans directly but rather by other applications (frontend apps). Its purpose is to perform remote tasks which, for some reasons, canβt be performed by the frontend apps.
Is it not clear to you? Itβs fine – normal even. To make it more intuitive, it should be easier to understand what the frontend app is and then try again to learn about the backend.
What is a frontend app?
I guess you have a lot of applications already installed on your phone. Probably, you both have and use apps like calculator, Instagram, or Facebook messenger. They all are frontend apps.
In fact, all the apps which you can download from the App Store (if you are an iOS user) or Google Play (if you use the Android system) are frontend apps. Whatβs more, they are also mobile apps. They run on mobile devices, which is what your phone is. The apps which you can interact with on your smartwatches, wrist bands, and all other kinds of mobile devices, are mobile frontend applications, too.
There is also another group of frontend apps that are not mobile apps. The apps which run on your fridge, car, desktop computer, or other kinds of devices that you can not carry with you, are not mobile apps. They are all frontend apps but just not mobile ones.
Are web pages frontend apps, too?
What about web pages, which you can see on your mobile phone or desktop browser? Are they frontend apps too? For a long time, web pages were only texts with pictures and acted more like interactive newspapers. They are generated by the server applications and sent to the browser in the format that the latter can interpret and display. Such pages are the frontend of the web site, and they can be opened on the mobile device but, in our case, it would be misleading to call them mobile frontend apps.
Nowadays, websites are much more complex. They are responsive, which means that they adapt themselves to all kinds of screens, such as desktops, tablets, or phones. They have complex forms, modal views, controllers, animations, and much more. They can even send you notifications.
For some websites, when you enter them, you are actually loading the simple text document first, which next loads the code for the complex user interface which is in fact the frontend application.
Some, on the other hand, are PWA applications (Progressive Web Applications) which are a type of web application that runs on your mobile device, making the user experience no different than typical mobile applications (the ones which you can find on your phone app store).
More and more frequently you will end on the pages which in fact load more than just simple code to be run by your browser (for example TripAdvisor). They are responsive, so they can be opened on either your phone or on your desktop and the interface adjusts for the deviceβs screen size. Such web sites can be called mobile frontend applications. However, to avoid misunderstandings, we should call them mobile web applications and leave the βmobile frontend applicationβ name for the apps which run on your phone and can be downloaded from the store.
Still, on the web, you can find static pages that are hard to be called frontend applications (for example, please check this one).
What do all frontend apps have in common?
What all those apps have in common is that they are directly used and designed for humans. You can interact with them through buttons, switches, tables, lists, and all other graphical interfaces. They all are meant to be intuitive and easy to be used by human users. Most of the time, they run on devices owned by their users, such as mobile phones. Of course, frontend apps can be run on other devices, like ATMβs or bus tickets machines available on bus stops, but the mobile ones are typically meant to run on smartphones. They all are frontend apps because they are apps which the user sees, and interacts with directly.
Now you should know what the frontend is. It is time to answer our main question.
What is the backend?
The backend applications are all pieces of software which frontend, as described above, is not.
More precisely, backend apps are meant to be used by frontend apps, not by humans directly. A frontend app communicates with the backend through the internet using protocols that are designed for machine to machine communication and not so intuitive for humans (like buttons, tables, or lists). The frontend appβs users are rarely even aware that there is some backend software behind the applications on their phones, browsers, or other devices.
Below you can see an example of JSON (interchange data format) which backends frequently use to communicate with frontend:
You can probably understand what data it carries but for the appβs end users it would be better to show such data in the form of a well-looking table.
The backend apps are hosted on remote servers. It is in opposition to the frontend, which typically runs on devices owned by their users. The servers on which the backend is set up can be physical machines, virtual cloud servers, or any kind of platform able to execute the remote tasks. As already said, frontend apps communicate with backend servers through the internet, exchanging the data in formats likes JSON shown above. It happens that one server handles many frontend applications, as well as many users, at the same time.
Please keep in mind, that in many cases, the backend is not just a single application or server like on the graphic above. It can be a whole net of cooperating apps and machines.
Backend is responsible for performing tasks that can not be performed on a frontend mobile app. It can be because of the:
- security reasons – for example, if we donβt want to allow frontend apps to access some vulnerable data
- store data – if users want to access their data (for example a contact list) through mobile app/browser app, or to get the list of other users who match some criteria (like dating app)
- communication – two users want to communicate through chat
- any other technical reason – there can be many more reasons why backend is needed, it is hard to list them all.
I hope itβs now clear for you what backend is. To be sure, letβs just review an example app and try to identify what backend can be responsible for.
Frontend vs backend examples
Letβs review the TripAdvisor app (Apple Store, Google Play).
It is an application for travelers where, among other functionalities, you can check for restaurant recommendations near to you. The app which you download on your phone from the store, where you see the list of restaurants, is the frontend mobile app.
The app shows you an intuitive list of restaurants. But how does it get the restaurant’s photos, addresses, and descriptions? They are all provided by a backend application.
When you open the app and search for restaurants, it communicates with its server, passes your current location there and, in exchange, it gets the list of nearby restaurants and the respective data. The application which runs on this server – and probably the whole network of cooperating servers – is the backend of TripAdvisorβs app. Below you can see a screenshot of a TripAdvisor βmobile web applicationβ with the developersβ tool open to preview the frontend-backend communication.
Does your mobile app need a backend?
As you know what the backend is, the next question is βDo you need a backend?β. In most cases, yes, you need something. It can be a small service or a really complex application. However, if you are a non-technical person, itβs likely not easy for you to guess. The best you can do is to consult with a mobile app expert, such as iOS/Android or backend app developers. Based on your app description and a quick survey, they should easily answer the question.
Of course, you can get some intuition first and try to answer this question by yourself. To make it easier, let’s try to answer the opposite question.
When donβt you need a backend?
As you already know, the backend is the software which the frontend application accesses through the internet. So, maybe it would be easier for you to answer the question:
Does my app need access to the internet?
Some apps can work completely offline. Of course, you probably need the internet to download them but, after that, maybe your app can work with no need to use the internet connection? If yes, then for sure your app can work without the need for a backend. If it needs the internet, however, it needs some backend, too. The question is what kind of backend you need. I will answer this question later. Before that letβs review some apps that donβt need a backend.
The mobile apps which are functional with no backend
Letβs review some apps which you can find probably on your phone and that work with no backend.
- Calculator (App Store, Google Play). The Calculator app allows users to do basic mathematical operations. They can be easily computed on the smartphone, with no need to involve any backend here.
- Measure (App Store, Google Play). The app allows users to measure anything you want just with your phone. You donβt need a ruler. You can use it to calculate square meters of your flat, all without a backend.
- Camera (App Store, Google Play). This app is built-in/installed by default on each smartphone. You can use it to take photos or record movies. It doesnβt need a backend to be useful. Of course, the current app version uses a backend to store backups of taken photos. However, in the basic idea of the app, the backend is not needed to take a picture.
- Voice recorder (App Store, Google Play). The app which you can use as a dictaphone. You can record your voice using the smartphoneβs microphone. It stores recordings on your deviceβs local storage, so it is fully useful with no need for any kind of backend.
- Tetris (App Store, Google Play). This is a game that I believe doesnβt need to be explained. To build such a game, the backend doesnβt need to be involved. Most single-player games donβt need backends to be playable – they are fully functional without them. For sure, the backend would be useful if you would like to have features such as leaderboards. Users of your app would be able to compare themselves with others, but the game itself is functional without such features.
If the idea for your app is similar to the ones presented above, there is a chance that it can be done with no need for a backend. If you are still not sure, down below you can find a list of functionalities that require you to have backend support.
Functionalities that require a backend
There are some common cases when the backend is surely needed. Letβs review some of them with the examples of the apps with such functionalities.
The app needs a back office, admin panel, or web page where you will be able to manage the content of the app.
Examples:
- Zalando: (App Store, Google Play). This app is an online fashion store. Users are able to browse through a list of products. The app administrators need a system (back office) where they are able to manage this list, including the ability to add new, remove old, or alter existing products.
- Netflix (App Store, Google Play). A video on-premise app. The admin panel for such an app allows admins to manage videos available in the app.
- Traficar (App Store, Google Play). It is a car-sharing app. You can find a car near you, reserve it, take it and drive wherever you like. To register in this app, you need to take a photo of your driver’s license, so administrators can verify it. The administratorβs panel is needed here to allow admins to review uploaded driver licenses.
The app shows data which updates frequently (every day, every week)
Examples:
- Stock (App Store, Google Play). This app fetches the prices of stocks from the backend and displays it in the frontend.
- Weather (App Store, Google Play). An app for checking the weather in your city. It needs the backend to fetch fresh data for upcoming days.
User devices should synchronize data between each other
Examples:
- Photos: having the app on your mobile phone and tablet so that, when taking a photo on one device, you can see it on the other.
- Reminders: adding a reminder on your phone and being able to review it on your tablet.
You want to be confident that app data will not be lost
Examples:
- Photos: thanks to backups, when you lose your phone, your photos can be restored from the cloud.
- Reminders: similarly, when you buy a new phone, your reminders are fetched back.
You need to collect orders and process payments
Examples:
- Zalando (App Store, Google Play): users can order new clothes and pay through the app.
- Uber (App Store, Google Play): the app processes payments for taxi rides. Read also: How to Make an App Like Uber: Process, Cost and Tips
- Stocks: users can buy a subscription to always have fresh data.
Users of the app should communicate with each other
Examples:
- Messenger (App Store, Google Play): it is the app for Facebook users, which allows communication via instant messages.
- mBank (App Store, Google Play): it is a bank application and, in case of troubles, you can easily talk to support staff using its chat functionality.
You want to collect statistical data about your users
- Zalando: such an app can collect data of your last orders to present suggestions to you.
You want your users to get notifications about promotions, updates or news
- Zalando: sends you notifications about new promotions.
I hope that all of those examples help you answer the question of if you need a backend. Let’s sum up when your mobile app needs a backend:
However, as I wrote at the beginning, it is hard to guess, even after reading all the above. The best option is to consult with experts. Nevertheless, if you have the feeling that you need a backend, down below you will find what are the options for it.
Are there many types of backend? What is right for you?
There are a lot of ways to classify backends. They can be classified by technology, the way they communicate with frontend apps, their architecture, and numerous other factors. For you as an App Owner, the best would be to classify it by the effort which is needed to create one.
The most straightforward option is a custom backend created from scratch. You can do this by hiring a development team, which will build such an app for you from the ground up. This is the most flexible option, giving you the possibility to create almost anything that your app needs. But it is not the only path available. Building your own backend costs time and money. Sometimes it is possible to go with a cheaper option. Maybe it would be enough for you to use a SaaS or MBaaS solution.
Service as a Service (SaaS) or 3rd party services
It can happen that the functionalities which you need are already offered by some existing services. They offer backend solutions that are ready to be used by frontend apps. You just need to register, subscribe under a monthly fee and, thatβs it, you’ve got a ready and working backend in a few clicks/seconds.
Below you can find a few cases when such a service can be used.
Weather data
If you need weather data, your frontend app can just fetch it from an already existing service like OpenWeatherMap. You need to pay a monthly subscription, but you donβt need to build it on your own.
Manageable content
If the frontend app displays some texts, images, movies, or other media which you want to be able to manage, you can use a headless cms service such as Contentful. It is up to you what content you want to manage. It can be articles, blog posts, news, your store products, or your restaurant menu. You just need to create an account there, add your credit card data, and you can start adding the media via the admin panel, which is also offered by this service. Frontend apps can fetch the content through API (backend application public interface).
Shop
If you are building an online shop, you can often use an established service like Shopify It is a platform which gives you a ready to use backend for your mobile app. It also gives you an admin panel to manage your products, stocks, shipment, and payments.
Using such services, you can save money on backend implementation. These platforms still have their subscription costs but, in most cases, this option is cheaper than creating a backend from nothing.
There are plenty of services like those described above which can suit the needs of your app. The only problem is to find one which is best for your needs. It can happen that there is no such solution that fits your app requirements. But it is always good to search and be sure.
If there is no such answer, the other option which can rescue you from having to build your own backend is MBaaS.
Mobile Backend as a Service (MBaaS)
These are services like Firebase or Parse. Some functionalities of the backend are common between for many apps, such as the way data is stored, authorization, authentication, push notifications, and a lot of others. MBaaS gives you the possibility to glue your backend from ready components that offer required functionalities. They even give you the option to write some custom code if the built-in features are not enough.
Such services are mostly easy to be used and, in many cases, frontend developers have no problem using and customizing them by themselves. You pay a monthly fee for resource usage (such as the number of push notifications sent, number of users, etc). If you predict really huge traffic on your service, it can become costly and, in a short period of time it could exceed the costs of a custom backend, but this almost never happens. This option is mostly more flexible than SaaS but requires some development work to be customized.
Custom backend development
This is the most flexible and powerful option. Everything which cannot be achieved by SaaS or MBaaS can be achieved by a custom backend. Of course, the obvious drawback is the price of setup and implementation. It requires having a dedicated backend programmer or a whole team. The custom backend can be a simple application or a complex distributed system, all depending on your app requirements. It is the costliest solution, but you are not as limited as you are in the case of the previous option.
From our experience, most apps end in the custom backend option. However, it is good to know other possibilities. For complex projects, it is possible that it can be done with a mix of all of the above solutions. Maybe some functionalities can be done with the use of SaaS, but some require implementing a custom backend. As I wrote at the beginning, it is not easy to find a clear answer on how your backend should be done, as such a question should be analyzed and decided by experts with great experience in this very issue.
Read also: How much does it cost to develop a mobile app?
How does a custom backend app development process look like?
Backend development looks the same as all other kinds of software development. The development team is set up with at least one backend developer. The number of developers should depend on the size of your project and the deadline when it should be released. If it is possible, it is best to start with one or two developers and add more over time when the project grows. Get our Free Guide for Product Owners: Drive your Product to Success.
Choosing tech stack for the backend mobile app development
When the development team is selected, they gather requirements and chose the base technology in which the app will be done. It includes choices of:
- the programming language
- architecture (like a monolith, modular monolith, microservices or serverless),
- infrastructure, the platform where your backend is run from, such as AWS, Heroku or one of many other platforms
- database, which can be SQL, NoSQL DB or another kind of DB, it is also possible to use a mix of different databases types,
- type of API, such as JSON API, REST API, GraphQL, XML, or any others.
As an example, the final choice of the backend technology stack can look like this:
- Programing language: TypeScript
- Architecture: Hexagonal monolith
- Database: PostgreSQL
- Infrastructure: AWS Elastic Beanstalk with AWS RDS
- Type of API: JSON Rest
Donβt worry if you donβt know what all it means. It should not be so important to you. I just wanted to show you that there are plenty of possibilities for how the custom backend can be done. Depending on the experience of the team in question, the proposal can differ a lot.
Development & QA
Next, it is time to start development. This can be done at the same time the frontend app is being developed, but it is always good if the backend app starts a bit earlier. Thanks to this, some features of the backend app can be ready before the frontend app needs them. The frontend developers are not blocked by the backend this way.
Regarding the development team, they typically work based on βtasksβ. A single task can be anything which is needed to be done to make your backend work. It can be a piece of functionality of your app. For example, if your app is an online shop, the task can be to βImplement payment processβ. The tasks also include requirements and acceptance criteria (read also: Top 25 E-Commerce Mobile App Features). When the task is ready to be started, the developer takes it and starts working on it. Depending on each task, the work can look different but, in most cases, the developer needs to:
- write automated tests,
- modify the server infrastructure,
- add the code which realizes the feature.
When the developer decides that the task is done, he or she pushes the code to the repository where the whole app code is stored. The code is checked in the process of code review by other developers. Thanks to this, the developers are checking each other to be sure that the code has a good quality. If it is approved, it is merged to the main codebase and the new version of the app is deployed on the server. Now, it can be tested by the tester. If it is ok, the task can be closed and the frontend app can start using the new functionality added by that task.
With each task completed, the backend grows interactively. As each iteration occurs, new features are added, while existing ones are improved to the moment when the app starts taking on its final shape and, ultimately, it is ready to be released.
Read also: Mobile App Development Process in 2020 β 7 Stages of App Development
Summary
What is a Backend for mobile applications? As weβve discussed, it is an application for your mobile application. It is a piece of software that is not meant to be used by humans directly but rather by the frontend applications which are run on the end-usersβ mobile devices, such as smartphones. The backend can run on remote machines or servers where, in opposition frontend, applications run on the userβs device.
Does your app need a backend? It is hard to answer this question but, in most cases, it does. The best option is to consult with mobile application experts. You can, of course, try to answer this question by yourself, by asking yourself if your app can work with no internet access. If it can, it realizes its goal and it is functional for end-users, which means that your app doesnβt need a backend.
What types of backend are there? If your app needs a backend, you should start thinking about what exact kind is most suitable. It can be enough to use some service which offers you a ready-made backend with an admin panel. It can happen that you need to use some mobile backend service which allows you to glue a simple backend together from ready to use components. But, if those options are not enough for you, you need to set up a backend application on your own. The process of building it looks exactly the same as the process of development for any other app. To be sure what is right for you, you should consult with experts who will advise you on the best option.
About the author
We Develop Mobile Apps for Startups and Enterprises
Predictable delivery, no surprises β Focus on the goals β Delivering at speed