Build Spring Boot Apps with the Kotlin Programming Language
7h 48mIntermediate2019-01-30
Authors

Matt Greencroft
Matt Greencroft is a full-time trainer and software development consultant.
Course details
Kotlin is an exciting programming language that's concise, has immutable variables, and almost always gets rid of null pointer exceptions. If you're a Java developer looking to get started with Kotlin, then this course is for you. Join instructor Matt Greencroft as he demonstrates how to build high-quality Spring Boot applications with Kotlin, specifically the version of Kotlin that runs on the Java Virtual Machine (JVM). As Matt covers a range of key concepts—from classes to loops—he explains how each Kotlin feature compares to the equivalent one in Java.
Learning objectives
Creating a new Kotlin project
Working with strings
Data types in Kotlin
Creating and calling top-level functions
Creating classes
Collections
Throwing exceptions
Class inheritance
Java interoperability
Functional programming
Using JUnit with Kotlin
Learning objectives
Creating a new Kotlin project
Working with strings
Data types in Kotlin
Creating and calling top-level functions
Creating classes
Collections
Throwing exceptions
Class inheritance
Java interoperability
Functional programming
Using JUnit with Kotlin
Skills covered
Spring BootKotlinMobile Device ManagementWeb Development ToolsFull-Stack Web DevelopmentWeb DevelopmentProgramming LanguagesNetwork and System AdministrationOpen SourceSoftware DevelopmentOne-Off
Concepts
1. Introduction
- 01 - Introduction
- 02 - What is Kotlin
- 03 - Installing IntelliJ
- 04 - Configuring IntelliJ
2. Working with Strings
- 05 - Creating a new Kotlin project
- 06 - Variable declaration syntax
- 07 - Inferring variable types and println
- 08 - Using string templates
- 09 - Multiple line strings
3. Other Variable Types
- 10 - Using the Double type and determining class types
- 11 - The Int data type
- 12 - Other data types
- 13 - Casting in Java
- 14 - Casting in Kotlin
- 15 - Chapter review
4. Nullable Variables
- 16 - Creating variables that can contain a null value
- 17 - Methods that work with nullable parameters
- 18 - The null-safe and non-null asserted operators
- 19 - The Nothing object type
5. Functions
- 20 - The function syntax and the Unit object
- 21 - Creating and calling top-level functions
- 22 - Single expression functions
- 23 - Using named parameters and optional parameters
- 24 - Other aspects of functions in Kotlin
6. Classes
- 25 - Project structure and packages
- 26 - The class declaration and class-level attributes
- 27 - Instantiating a class and accessing class-level attributes
- 28 - Creating a simple constructor
- 29 - Secondary constructors
- 30 - Alternative class design
- 31 - Overriding getters and setters
- 32 - Functions within a class
- 33 - Static functions
- 34 - Data classes
7. Practical Exercise 1
- 35 - Explaining the challenge
- 36 - Solution walk-through
8. If and Object Equality
- 37 - The if keyword as an expression
- 38 - Using if to do a null-safe check
- 39 - The let function
- 40 - Object equality and the when expression
9. Ranges and Looping
- 41 - The while loop
- 42 - Using for to loop through a collection
- 43 - Destructuring with a for loop
- 44 - Looping with a range
10. Collections
- 45 - Mutable collections with immutable variables
- 46 - Immutable lists
- 47 - Mutable lists
- 48 - Maps and sets
- 49 - Working with arrays
11. Practical Exercise 2
- 50 - Explaining the challenge
- 51 - Solution walk-through
12. Exceptions and the try-catch Block
- 52 - Exceptions are unchecked
- 53 - Throwing exceptions
- 54 - try as an expression
- 55 - use as an expression (try with resources)
13. Testing
- 56 - Using JUnit with Kotlin
- 57 - The Kotlin test assertions
- 58 - Testing for exceptions
14. Polymorphism and Inheritance
- 59 - Creating and implementing interfaces
- 60 - Class inheritance
- 61 - Creating custom exceptions
- 62 - Extension functions
15. Java Interoperability
- 63 - Instantiating classes and providing values to non-nullable variables
- 64 - Using data classes
- 65 - Using immutable lists
- 66 - Exception handling
- 67 - Using static functions
- 68 - Importing a Kotlin JAR file into a Java project
16. Getting Started with Spring Boot
- 69 - Creating a project with the Spring Initializr
- 70 - A hello world controller
- 71 - Auto-restarting an application
- 72 - Overview of the case study
- 73 - Creating views and backing beans
- 74 - Connecting views to controller functions
- 75 - Adding services
- 76 - Posting to a controller
- 77 - Dependency injection
- 78 - Revisiting backing beans
17. Functional Programming
- 79 - Functional programming overview
- 80 - Methods that take function parameters the Java way
- 81 - Methods that take function parameters the Kotlin way
- 82 - Functional programming with lists
- 83 - filter and flatMap
- 84 - reduce and fold
- 85 - Working with maps
18. Getting Started with Hibernate
- 86 - Adding the Hibernate dependencies
- 87 - The challenge of creating entities
- 88 - Persisting data to a database
19. Practical Exercise 3
- 89 - Step 1 - Explaining the challenge
- 90 - Solution walk-through
- 91 - Mappings between entities
- 92 - Upgrading the view
- 93 - Step 2 - Explaining the challenge
- 94 - Solution walk-through
- 95 - Step 3 - Explaining the challenge
- 96 - Solution walk-through
20. Reflection
- 97 - The concept of reflection
- 98 - Inspecting properties and functions
- 99 - A practical use for reflection
- 100 - Thank you and goodbye