Jan 6, 2024

Spring Boot for App Backends

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

Spring Boot for App Backends

Spring boot is one of the most popular java backend solutions. We have covered the different backend technologies here in greater depth. In this post however we are going to focus on spring boot.

What is spring boot ?

Spring boot is an open source java framework that is designed for microservices but is also fully capable of being used for other scenarios such as pure rest based backends or entirely monolithic full stack applications. It is not a batteries included styled framework like say Ruby on Rails or Laravel, but this is more highly customizable tool with wide variety of options to mix and match. The fact that it runs on JVM automatically also means you can use Kotlin as primary language instead of Java.

Why spring boot for app backends ?

When you are building a backend, very likely your primary need is to have a secure REST based api first. Spring boot makes this extremely simple. Spring boot relies on standard libraries and interfaces such as JPA (Java Persistence API) and its concept of Repositories to very easily give you highly customizable REST based interface for your database tables. Want to list all blog posts in paginated format ? It is as simple as add in one empty method to an interface. It is all ridiculously simple.

But it also has libraries like Spring Security, which will allow you to make your APIs very secure and put them behind different authentication and authorization mechanisms such as Oauth.

Hosting spring boot

Spring boot can be hosted in any major cloud service provider. Typically there arent any free hosting providers like Vercel (for nodejs) or PHP. But the spring boot can run on very tiny machines. For a barely used web application I would recommend using Google Cloud Run service.

We have provided an open source template that you can easily deploy to Google Cloud Run.

Things to consider when choosing Spring Boot.

Spring boot has a steep learning curve

Java or Kotlin are very different from languages like Javascript or PHP. This means learning these languages can take time. In Spring boot you will have to learn concepts like dependency injection, annotations, interfaces, JPA, ORM etc. which may or may not be simple concepts for you. Consider the learning curve when choosing this technology.

Microservices based thinking

Microservices architecture is typically for larger companies. But it might still make sense for your project. Spring boot excels at such archiecture but there is nothing wrong in using it as monolithic framework either.

Do you want a different front end?

At some point you might also want to build a website for you app with all the same features. Do keep in mind that you can either have the same spring boot framework render the web UI or use a separate technology such as nextjs to talk to spring boot backend and render pages. Either are good choices.

Containerization

Spring boot is best when run on containerized services such as Google Cloud Run or your own K8 cluster. I would recommend against spring boot if your plan is to run it on a shared server along with 10 other processes.

We can help you set this up.

If you need help and consultation to achieve this, Wiseland Inc's experienced engineers from Silicon Valley and India are always happy to help. We can setup the basic project structure for you very quickly.

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

Backends for your Android App

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.

Published Jan 1, 2024

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

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