Developing an App, Part 2: Choosing a Backend

This is the second in a series of posts going through the process of developing an app.

Choosing a Backend

In this post I look at several backends to see how well they fit the app’s requirements.

What is a Backend?

A backend consists of all the parts of an app that don’t run locally on your device. A frontend, in contrast, is all the parts that do run locally.

Take an email app, for example. With it you can compose and send emails, read and reply to new emails, and be notified when new emails arrive. More than likely, you can do this from both a phone app, and via the browser on a PC.

The backend manages:

  • The authentication of users
  • The privacy and security of emails
  • The sending of outbound emails
  • The receiving of inbound emails
  • The storage of sent and received emails and drafts
  • The security of your emails
  • The filtering of spam
  • and more

What Does the App Require?

Our app backend requires:

  • Authentication of users
  • Storage of user data
  • Security and privacy of user data
  • A programming interface that it easy to use with Flutter

What Backends Are Available?

A number of backend services are available from different companies.

A number of different service levels are available:

  • Infrastructure-as-a-Service (IaaS) is a service where you create your backend with Docker and Kubernetes and they will run it for you, scaling as necessary.

  • Platform-as-a-Service (PaaS) is a service where you create your backend, programming to their APIs, and they run it for you, scaling as necessary. You use their APIs to communicate between different services, and don’t need to worry about it yourself. It’s a layer of abstraction above IaaS.

  • Backend-as-a-Service (BaaS) is a fully integrated backend service. You need to write a minimum amount of custom code, everything else if taken care of. It’s a layer of abstraction above PaaS.

Amazon AWS

Amazon Web Services (AWS) was the first PaaS cloud environemnt, and is still the largest and best known. Their Flutter support appears to be limited to a few 3rd party libraries, and it doesn’t seem to be on their roadmaps.

Google Firebase and Google Cloud Platform

Google’s Firebase is an integrated BaaS with the best Flutter support (at time of writing); not a surprise as Google also develop Flutter.

Google Cloud Platform (CGP) is Google’s PaaS offering.

Microsoft Azure

Azure is Microsoft’s PaaS offering. Their Flutter support is on a par with Amazon’s.

Others

A number of other companies also offer IaaS and PaaS services.

Conclusions

The decision to write the app in Flutter to target the largest number of devices greatly and unintentionally influenced the suitability of the backends available, with Firebase having the best support.