What is Quarkus?
Get introduced to Quarkus and its main features.
We'll cover the following
Course overview
The goal of this course is to introduce the fundamentals of Quarkus and what we can build with it.
Basic knowledge of Java is helpful, but it is not required because we’ll be writing simple code from scratch.
The course will start by introducing Quarkus, and then we’ll dive a little deeper into Quarkus by building a web application with different standards. We’ll also cover data handling using different types of databases.
Overview
Quarkus is a Java framework created by
Quarkus is an open-source project under the Apache License version 2.0. The main contributor behind this project is the developer community, supported by Red Hat.
Features of Quarkus
As with any modern framework, the team behind Quarkus has promised many features. Here are some of the main features they’ve put forward:
Developer friendly
Quarkus offers many features that make developing new applications easier and simpler to adapt. The most notable are:
-
Live coding:
Quarkus offers the possibility of automatically refreshing your application when code changes. This means that every time we hit “Save” on a file, Quarkus will automatically update and reload the application.
Note: Update configuration for the application might require restarting the service to take the changes into effect.
-
Simple configuration:
Configuring a Quarkus application is as easy as creating a
.properties
(or.yaml
) file. Apart from the application and the extension’s configuration, Quarkus allows us to create our configuration variables to be used in the application. -
Dev interface:
In development mode, Quarkus allows the developer to access a web page with a view of different extensions with the option to configure them.
-
Command-line interface:
Quarkus offers a command-line interface (CLI) that allows us to create and configure our application. The CLI supports different build tools, like Maven and Gradle.
Cloud native
Quarkus provides integration with Kubernetes, which allows us to easily deploy a microservice application to Kubernetes with various features, like debugging, application health, and metrics.
By default, Quarkus creates an example code to generate Docker images in both native and JVM (Java virtual machine) modes.
Extensions
Many extensions are supported by Quarkus, with regular additions and updates. Such extensions allow us to build web applications, access various databases, access mailing services, and implement different security options.
Some of the most-used extensions include:
-
Core extensions for application configuration, logging, and dependency injection.
-
Web extensions to create and document APIs.
-
Data extensions to consume and update data in SQL and NoSQL databases.
-
Messaging extensions that give us the possibility to connect to different messaging services, such as Kafka and MQTT.
-
Cloud extensions that facilitate handling different cloud providers.
-
Security extensions to secure our application.
-
Alternative languages provided via extensions for Kotlin and Scala.
Native support
Quarkus offers the possibility to compile our application in native mode. This means the application is shipped without JVM, so it consumes less memory and computing power.
Note: Building a native
might require some special instructions. image A native image is a Docker image or an executable.