Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Kotlin Design Patterns and Best Practices - Third Edition

You're reading from  Kotlin Design Patterns and Best Practices - Third Edition

Product type Book
Published in Apr 2024
Publisher Packt
ISBN-13 9781805127765
Pages 474 pages
Edition 3rd Edition
Languages
Author (1):
Alexey Soshin Alexey Soshin
Profile icon Alexey Soshin

Table of Contents (19) Chapters

Preface Section 1: Classical Patterns
Getting Started with Kotlin Working with Creational Patterns Understanding Structural Patterns Getting Familiar with Behavioral Patterns Section 2: Reactive and Concurrent Patterns
Introducing Functional Programming Threads and Coroutines Controlling the Data Flow Designing for Concurrency Section 3: Practical Application of Design Patterns
Idioms and Anti-Patterns Practical Functional Programming with Arrow Concurrent Microservices with Ktor Reactive Microservices with Vert.x Assessments
Other Book You May Enjoy
Index

Getting started with Vert.x

Vert.x is a Reactive framework that is asynchronous and non-blocking. Let’s understand what this means by looking at a concrete example.

We’ll start by creating a new Kotlin Gradle project. You can follow the steps from the previous chapter for that. Alternatively, you can also generate a new project by using start.vertx.io.

Next, add the following dependencies to your build.gradle.kts file:

val vertxVersion = "4.5.6"
dependencies {
    implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
    implementation("io.vertx:vertx-web")
    implementation("io.vertx:vertx-lang-kotlin")
    implementation("io.vertx:vertx-lang-kotlin-coroutines")
}

Similar to what we discussed in the previous chapter, all the dependencies must be of the same version to avoid any conflicts. That’s the reason why we are using a variable for the library version—to be able...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}