Build Spring Boot Apps With The Kotlin Programming Language

Tags: Kotlin

Build fully functional, robust and efficient applications with Spring Boot and the Kotlin programming language

Last updated 2022-01-10 | 4.4

- Build fully functional
- robust and efficient applications with Spring Boot and the Kotlin programming language

What you'll learn

Build fully functional
robust and efficient applications with Spring Boot and the Kotlin programming language

* Requirements

* You should have some basic Java experience
* as the approach is to convert your Java knowlege and skills to Kotlin
* rather than to teach programming from scratch.
* You should have basic experience of building Spring Boot applications in Java - ideally you'll be familiar with building a controller
* and connecting to a database with JPA.
* Even if you don't have too much experience with Java or Spring
* you will be able to take this course
* just be prepared to look up anything which isn't completely familiar!

Description

Kotlin is a programming language for the JVM (and also for Javascript and native code too) which was created by JetBrains - the company behind the IntelliJ IDE. It offers a number of enhancements over Java, including that it's less verbose, has immutable variables, and almost always gets rid of the NullPointerException. Compared to other JVM languages, such as Scala, Kotlin is an easy transition for Java developers, and the Kotlin team hope that it will eventually replace Java alltogether!

In this course we learn how to code in Kotlin, with a particular focus on how to build full stack Spring Boot applications with Kotlin.

This course is aimed at existing Spring Framework Java developers who want to upgrade their skills to use Kotlin instead of (or as well as) Java.

Who this course is for:

  • Java developers, using the Spring Framework, who want to upgrade their skills to Kotlin

Course content

21 sections • 116 lectures

What is Kotlin Preview 07:20

Configuring and installing IntelliJ Preview 10:39

How to get support while you're taking this course Preview 01:51

Creating a new project in Kotlin Preview 01:52

Creating a Kotlin hello world project - just to check everything is working Preview 03:59

The syntax of declaring a variable - the var and val keywords Preview 04:36

Inferring variable types Preview 04:28

Using String templates Preview 04:44

Creating a string with multiple lines Preview 06:53

Using the Double data type, and determining class types in Kotlin Preview 04:27

The Int data type Preview 02:16

Other data types Preview 06:15

Casting from one data type to another - the Java version Preview 05:12

Casting from one data type to another - the Kotlin version Preview 06:40

Chapter review - what we have learned in this chapter Preview 01:16

Creating variables that can contain the value null Preview 04:37

Running methods which work with nullable variables Preview 02:36

The null-safe operator Preview 02:23

The non-null asserted operator Preview 01:57

The nothing object type Preview 03:08

The function syntax, and the Unit object Preview 04:04

Creating and calling top level functions Preview 04:56

Single expression functions Preview 03:19

Using named parameters when calling functions Preview 02:38

Using optional parameters in functions Preview 03:11

Parameter attributes are always immutable Preview 00:53

Functions within a function Preview 01:25

Functions that take a lambda parameter Preview 04:36

Project structure and packages Preview 02:08

The class declaration, and adding attributes Preview 03:36

Instantiating a class, and accessing the class attributes Preview 02:19

Creating a simple constructor Preview 05:11

Adding secondary constructors to a class Preview 05:25

Alternative class design Preview 05:08

Overriding getters and setters Preview 06:04

Creating a dummy variable get method Preview 01:26

Functions within a class Preview 01:31

Overriding functions Preview 01:36

Creating static functions Preview 03:35

Data classes Preview 03:35

Destructuring and ComponentN functions Preview 04:01

The challenge - explaining the Java code Preview 04:38

Solution walkthrough Preview 09:52

The if keyword as an expression in kotlin Preview 03:18

Assigning a variable using an if expression Preview 01:42

Assigning values using if to do a null-safe check Preview 04:25

The Elvis operator Preview 02:53

Using the Elvis operator to overcome null-safe check smart cast compiler warning Preview 03:44

The let function Preview 06:03

Object equality Preview 02:59

The when expression Preview 02:39

The while loop Preview 01:28

Using for to loop through a collection Preview 05:31

Destructuring with a for loop Preview 03:05

Looping with the Range object Preview 03:47

Creating different types of ranges Preview 02:30

Mutable arrays with immutable variable assignments Preview 01:51

Creating an immutable list Preview 03:44

Creating a mutable list Preview 01:37

Creating maps and sets Preview 01:47

Working with Arrays in Kotlin Preview 04:15

The challenge - explaining the requirements Preview 07:12

Solution walkthrough Preview 08:47

All exceptions in Kotlin are unchecked Preview 04:57

Throwing exceptions Preview 04:50

Try as an expression Preview 02:28

Using the use expression to ensure resoruces are always closed Preview 02:57

Using Junit with Kotlin Preview 05:05

The Kotlin test assertions Preview 05:14

Testing for exceptions Preview 04:19

Creating and implementing Interfaces Preview 04:51

Class inheritance Preview 02:38

Inheriting from classes with constructors Preview 01:44

Implementing multiple interfaces Preview 01:03

Creating custom exceptions Preview 02:40

Adding functions to existing classes (extension functions) Preview 04:36

Providing values to non-nullable variables Preview 06:12

Using data classes Preview 01:25

Using immutable lists Preview 02:22

Exception handling Preview 02:37

Using static functions Preview 03:04

Importing a Kotlin jar into a Java project Preview 04:11

Creating the project using the Spring Initializer Preview 04:40

A hello world controller Preview 03:51

Auto restarting the application when we make changes Preview 04:18

Outline of the application we'll be building Preview 01:46

Loading in the views and creating a backing bean Preview 05:20

Connecting the view with a controller function Preview 02:16

Adding services to the project Preview 04:12

Posting data to a controller function Preview 02:36

Dependency injection Preview 06:15

Putting everything together Preview 03:08

Revisiting backing beans Preview 03:31

Functional programming overview Preview 02:58

Methods that take functions as parameters - the Java way Preview 07:22

Methods that take functions as parameters - the Kotlin way Preview 05:27

Using functional programming with lists - the map transformation Preview 06:53

The Filter and FlatMap transformations Preview 03:51

The Reduce and Fold transformations Preview 06:38

Working with Maps Preview 03:13

Adding the Hibernate dependencies to our project and creating the database Preview 05:16

The challenge of creating entities Preview 04:50

Adding in the Kotlin JPA compiler plugins Preview 03:00

Persisting data to our database Preview 05:08

Step 1 - adding in the performances functionality Preview 04:13

Solution Walkthrough Preview 02:40

Mappings between entities Preview 06:46

Upgrading the view Preview 12:19

Step 2 - adding in the check availability process Preview 02:32

Solution Walkthrough Preview 09:09

Step 3 - adding in the booking process Preview 03:26

Solution Walkthrough Preview 04:20

The concept of reflection Preview 07:25

Inspecting the properties and functions of a class Preview 03:52

A practical use for reflection Preview 10:19