Improve your coding skills from beginner to expert with the largest online Java e-learning platform

Kotlin with Spring Boot

Build fully functional, robust and efficient applications with Spring Boot and the Kotlin programming language
  • 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.

Pre-requisites

To undertake this course you should have 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 also have basic experience of building Spring Boot applications.

Contents - Contains 7 hours 45 minutes of video - equivalent to 3 days of live training

 

Having problems? check the errata for this course.

1

Introduction


17 m 54 s
What is Kotlin, and why Java developers should consider using it. Installing and configuring IntelliJ.

2

Strings


26 m 9 s
We start by declaring string variables. We'll learn about how Kotlin differentiates between mutable and immutable variables, and see some of the enhancements from the Java String such as string templates and multi-line strings.

3

Data Types


25 m 44 s
We'll understand how to use the numeric data types in Kotlin, such as integers, doubles and big Decimals. This will include assigning values to immutable variables, and how to cast variables to different data types. Kotlin also has a feature called smart casting which can reduce the amount of times we need to cast a variable to a different data type.

4

Nullable Variables


14 m 25 s
What happens when variables can contain the value null?

5

Functions


24 m 21 s
Functions are the Kotlin equivalent of Java methods - here we'll learn how to create functions - the standard function signature and single line expression functions

6

Classes


44 m 10 s
Creating classes - the general class and the data class. We'll see how attributes are declared in classes, where they are visible, and we'll revisit the val and var keywords. We'll also cover class constructors.

7

Exercise 1


14 m 24 s
This chapter is a practical exercise - to give you a chance to practice what we have learned so far.

8

If and Equality


27 m 12 s
If is an expression in Kotlin. We'll understand how it differs from Java's if statement, and we'll learn about how to create multiple if statements with the when expression. This chapter also covers testing for object equality in Kotlin.

9

Loops and Ranges


16 m 4 s
Kotlin has specific syntaxes for the for and while loops. Part of this requires an object type called a range, so we'll learn about these also in this chapter.

10

Collections


12 m 56 s
We'll now dive into how mutable and immutable collections are created and used in Kotlin. This will also include how to use arrays.

11

Exercise 2


15 m 55 s
This chapter is a practical exercise - to give you a chance to practice what we have learned so far.

12

Exceptions


14 m 59 s
All exceptions in Kotlin are unchecked - we'll understand what this means, and how it impacts our code. We'll create try-catch blocks, with try as an expression, and we'll see the use keyword.

13

Unit Testing


14 m 28 s
You can write unit tests with Junit for your Kotlin applications. We'll consider how these work, and talk a little about a Test Driven Development approach for building Kotlin applications.

14

Interfaces and Extending


17 m 11 s
It's time for object orientation. We'll learn how Inheritance and Interfaces work in Kotlin. We'll also see how you can add functions to a class (extension functions). This knowlege will also allow us to create custom exception classes.

15

Java Interoperability


19 m 28 s
We cover calling Java code from Kotlin throughout this course, so this chapter is dedicated to how we can call Kotlin code from Java. We focus on some of the issues you need to consider as a Kotlin developer if you know that Java developers will be wanting to call your code.

16

Spring Boot


41 m 9 s
We're finally ready to introduce Spring Boot. In this chapter we start a new Spring Boot application. We'll build a controller and a web page

17

Functional Programming


35 m 56 s
Kotlin supports both object oriented and functional programming approaches to code, and the functional programming options are much simpler and more powerful than Java 8's Lambdas. In this chapter we learn what functional programming means, and see how we can use it to simplify manipulating collections.

18

Hibernate


18 m 0 s
We're now ready to expand our Spring Boot application by connecting it to a database, and use Hibernate / JPA to manipulate our data

19

Exercise 3


44 m 54 s
A practical exercise for you to build up our Spring project and use functional programming. There are some real challenges in this exercise, but by the end you'll see how we can build effective applications in Spring using Kotlin.

20

Reflection


21 m 33 s
In this final chapter we cover reflection - the ability to look inside a class and access its attributes and methods without knowing their names. We'll see how we can use it to further enhahnce our Spring project.

Let the Course Come to You

About Us Pricing Frequently Asked Questions Contact Privacy T&Cs Affiliates and Resellers
Facebook Twitter YouTube LinkedIn