Jan 1, 2024

Backends for your Android App

In this article, we will explore the various options available for app developers who are primarily focused on building an app backend.

Backends for your Android App

If you are a seasoned full stack developer then this is not an article for you. This article is primarily aimed at developers who have lots of experience building apps but not necessarily app backends.

Choosing a backend

A backend is a server that exposes certain API to the the app. The app then makes network requests to this backend using the api. Chances are you already know how this works.

Firebase

But how exactly are backends built ? There are two primary options before you. Use some service like Firebase which allows you not to even own a server and just gives you Android SDKs to build your app. Such services can fully support nearly all major use cases that an app might require.

The problem with such solutions however lies in the fact that these services are often paid and more expensive. Also, the frequently changing apis mean you have to keep updating your app from time to time.

Also, at some point you might have to also have a website or other sort of interface that uses the same backend or have custom integrations with other services at which point services like Firebase prove to be inadequate.

Other option before you is to build something of your own. This requires considerable learning curve.

Build your own backend

Spring Boot

Over years this has been my favourite framework to quickly roll out services that are accessed by the the app. This is a Java or Kotlin based framework but runs with very little memory footprint. It is extremely powerful and has no limits of what it can do, but for the app usecase where you just want a REST API it can be extremely simple to setup and deploy on say Google Cloud Run.

Laravel

This is one of the most popular PHP frameworks and knowns as "batteries included" framework which means it has nearly everything in built to build a proper backend API. PHP is also lot simpler to understand and learn and there is a large community that can support you.

The disadvantage is that it is less performant than Spring Boot and might require more complex setup to run in containerized environment.

Rails

Ruby on Rails is another rapid application development framework that can satisfy most of your needs however it invariably requires more server resources than anything else. It has code generation tools that generate most of the Ruby code for you which is simpler to understand.

NextJs

While Nextjs is typically considered front end framework it does support full stack development and it can certainly expose a REST api for your Android app. More importantly it is incredibly simple to turn this web api into a full fledged web application if you want that.

Learning to build backends

Well, it is out of scope for this particular article though our other engineering blogs might cover this in greater depth eventually. However you should be prepared to learn new languages, new terminology and be comfortable with things like SQL, Cloud deployments and Docker. If you dont have time for that then just look at something like Firebase.

References:

[1] https://www.frontendeng.dev/blog/30-spring-boot-for-full-stack-rails-laravel-alternative

[2] https://spring.io/projects/spring-boot/

[3] https://laravel.com/

[4] https://rubyonrails.org/

[5] https://nextjs.org/

Continue Reading
Learn about other front end technologies

Learn about other front end technologies

We are partnering with Frontendeng.dev to cross promote the content around front end engineering.

Published Dec 12, 2023

Android paired with Windows Laptops

Android paired with Windows Laptops

The new trend is to build Android and Windows Laptop into one hardware.

Published Jan 11, 2024

What are co-routines in Kotlin ? Kotlin for Android Part -2

What are co-routines in Kotlin ? Kotlin for Android Part -2

In this part we will learn about Kotlin's co-routines. It is an important concurrency design pattern that is extremely useful when designing asynchronous programs.

Published Dec 31, 2023

Google Flutter vs Android Jetpack Compose : A detailed comparison

Google Flutter vs Android Jetpack Compose : A detailed comparison

Flutter code looks remarkably similar to Android Jetpack Compose. However which one of them is better ? We find out in this article.

Published Jan 11, 2024

Minimal starting template for Android Compose

Minimal starting template for Android Compose

Find a simple minimal code to open an app with top and bottom bar. Find full code on https://github.com/Wiseland-Inc/dev.androidauthority.app

Published Dec 11, 2023

Spring Boot for App Backends

Spring Boot for App Backends

Simple spring boot template to deploy on Google Cloud and to be used as your app backend.

Published Jan 6, 2024

Learning Kotlin for Android development - Part 1

Learning Kotlin for Android development - Part 1

A guide focused on teaching you basics of Kotlin just for Android development.

Published Dec 7, 2023

Making android development less painful

Making android development less painful

Android development has always been challenging and frustrating right from start. However things are looking better now.

Published Dec 4, 2023

Understanding Layouts in Android Compose

Understanding Layouts in Android Compose

A very quick tutorial on compose and layouts.

Published Dec 10, 2023

What are adaptive android apps ?

What are adaptive android apps ?

Adaptive apps are app equivalent of responsive web apps. Apps that resize to give good user experience across several devices.

Published Dec 9, 2023