Backend
Talk is cheap, show me the code
― Linus Torvalds
Backend Development
Nowadays there is a plethora of technologies that can be used to develop the backend of an application. Which one to chose depends on the application domain, architecture, programming language, runtime environment, among several other factors.
This section presents frameworks that we commonly use at Welld for backend development. And if you are wondering whether there is performance comparison of the (backend) frameworks... Yes, there is.
Java Virtual Machine
Spring Framework/Spring Boot
Spring Framework and its son Spring Boot are by far the most used frameworks to build backend applications in Java.
Both Spring Framework and Spring Boot applications are written in Java or Kotlin. While Spring Framework applications are packaged as WAR and deployed to an application server like Jetty, Spring Boot applications run on an embedded server.
It is worth to mention that Spring supports blocking and reactive development as well.
To better suit containerization, a Spring application can be now compiled to a native image.
To learn more about Spring Framework/Spring Boot and start coding:
Micronaut
Micronaut is a framework similar to Spring Boot in terms of features. However, Micronaut has been designed for fast startup time and low memory consumption. Thus, Micronaut is a good match for developing microservices. The performance boost over Spring Boot is mainly provided by the Ahead of Time (AOT) compilation: many things that happen at runtime in Spring applications are done at compile time in Micronaut applications.
Micronaut applications can be written in Java, Kotlin, Groovy.
Yes: Micronaut supports both traditional and reactive paradigms (Micronaut is built on Netty). And with Micronaut is also easy to compile your application to a native image.
A nice feature is the support to
API versioning
by means of the @Version
annotation.
To learn more about Micronaut and start coding:
- Micronaut Creator presents his creature
- Micronaut Docs
- Micronaut Launch
- Micronaut vs Spring Boot vs Quarkus performance comparison (article)
- Micronaut vs Spring Boot vs Quarkus performance comparison (presentation)
Quarkus
Quarkus is a framework very similar to Micronaut: they both share the common goal of providing fast boot time and low memory consumption.
A substantial difference between Quarkus and Micronaut lies in the fact that Quarkus is compatible with the standardization initiative MicroProfile, while Micronaut is not. This means that Quarkus shares APIs with other frameworks (e.g. Helidon) and the learning curve could be smoother for Java EE developers compared to Micronaut.
While Microunaut is based on Netty, Quarkus embeds the Vert.x HTTP server. Relying on Vert.x, Quarkus natively supports the reactive paradigm. The execution model (i.e., what happens when a request hits your Quarkus application) is nicely described here.
To learn more about Quarkus and start coding: