Transitioning from Java to Kotlin
2h 35mIntermediate2022-11-28
Authors

Nate Ebel
Staff Engineer, Google Developer Expert, and Podcast Host
Course details
If you’re a web developer, you may be considering a switch from Java to Kotlin. Kotlin is probably best well-known as the language for Android development—it’s concise, flexible, and includes a powerful set of modern language features—but it’s also a great choice for JVM-based web development. In this course, Nate Ebel guides you through the transition from Java to Kotlin for server application development. He starts by exploring Kotlin’s place in the JVM ecosystem, then shows you how to migrate an existing Java-based Spring Boot application to Kotlin. He also shows you how to build a new application using Ktor, a Kotlin-based client/server framework. If you’ve wondered what Kotlin’s features can do for your JVM web development, join Nate in this course.
Skills covered
KotlinJavaOracleProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
Introduction
- Move from Java to Kotlin to build your dream application
Java and the JVM Ecosystem
- What is Kotlin
- Kotlin and other JVM languages
- Where is Kotlin used today
Kotlin for Server-Side Applications
- Server-side Kotlin frameworks
- Try Kotlin
- Integrating Kotlin into existing applications
- Why choose Kotlin
Setting up Your Kotlin Development Environment
- Introducing IntelliJ
- Setting up IntelliJ for macOS
- Setting up IntelliJ for Windows
Integrating Kotlin into an Existing Spring Boot Application
- Exploring an existing server-side application
- Adding Kotlin to an existing project
- Migrating Java code to Kotlin
- Handling platform types
- Leveraging Kotlin language features
- Java and Kotlin interop
- Challenge - Migrate the project to Kotlin
- Solution - Migrate the project to Kotlin
Building a Server-Side Application Using Ktor
- Creating a new Ktor project
- Adding your first route
- Testing your local service
- Adding status pages
- Storing a list of products
- Returning typed responses
- Adding new products
- Authenticating routes
- Challenge - Return all active orders
- Solution - Return all active orders
Conclusion
- Next steps