Book Image

Building Applications with Spring 5 and Kotlin

By : Miloš Vasić
Book Image

Building Applications with Spring 5 and Kotlin

By: Miloš Vasić

Overview of this book

Kotlin is being used widely by developers because of its light weight, built-in null safety, and functional and reactive programming aspects. Kotlin shares the same pragmatic, innovative and opinionated mindset as Spring, so they work well together. Spring when combined with Kotlin helps you to reach a new level of productivity. This combination has helped developers to create Functional Applications using both the tools together. This book will teach you how to take advantage of these developments and build robust, scalable and reactive applications with ease. In this book, you will begin with an introduction to Spring and its setup with Kotlin. You will then dive into assessing the design considerations of your application. Then you will learn to use Spring (with Spring Boot) along with Kotlin to build a robust backend in a microservice architecture with a REST based collaboration, and leverage Project Reactor in your application. You’ll then learn how to integrate Spring Data and Spring Cloud to manage configurations for database interaction and cloud deployment. You’ll also learn to use Spring Security to beef up security of your application before testing it with the JUnit framework and then deploying it on a cloud platform like AWS.
Table of Contents (12 chapters)

Why use Project Reactor?

There are a lot of good reasons for our project to support Project Reactor. If you plan to develop serious enterprise software, Project Reactor will most likely offer solutions for some of the most common challenges. Let's have a brief look at its power features:

  • It is fully non-blocking
  • It offers reactive API such as Flux [N] and Mono [0|1], each implementing Reactive Extension (http://reactivex.io/)
  • It is suited to the microservices architecture
  • It supports backpressure-ready network engines
  • It is efficient at passing messages

In the next sections of this chapter, we will give you a further explanation of Project Reactor and how it can be used with Spring. We will demonstrate its use by extending our code base to support Project Reactor.