Kotlin with Spring Boot

Try for free!

Subscribe and stream all our courses
from just USD19.00 per month
Start my free trial

Kotlin with Spring Boot

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

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

  • 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.
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

Having problems? check the errata

Introduction 17m 54s

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

Preview

Strings 26m 9s

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.

Watch

Data Types 25m 44s

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.

Watch

Nullable Variables 14m 25s

What happens when variables can contain the value null?

Watch

Functions 24m 21s

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

Watch

Classes 44m 10s

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.

Watch

Exercise 1 14m 24s

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

Watch

If and Equality 27m 12s

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.

Watch

Loops and Ranges 16m 4s

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.

Watch

Collections 12m 56s

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

Watch

Exercise 2 15m 55s

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

Watch

Exceptions 14m 59s

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.

Watch

Unit Testing 14m 28s

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.

Watch

Interfaces and Extending 17m 11s

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.

Watch

Java Interoperability 19m 28s

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.

Watch

Spring Boot 41m 9s

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

Watch

Functional Programming 35m 56s

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.

Watch

Hibernate 18m 0s

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

Watch

Exercise 3 44m 54s

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.

Watch

Reflection 21m 33s

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.

Watch
Copyright ©2024 VirtualPairProgrammers.com