Source Talks: On Kotlin – First in-person Meet Up on Thursday 20th October
Kotlin fans, it's here, our 1st in-person meet-up.
The evening will consist of talks, discussions, and Q&As with our guest speakers.
Location - WeWork, 1 Mark Square, EC2A 4EG
6 pm - Arrival/networking, pizzas, and beer/wine/ soft drinks
6:30 pm – 7:15 pm– Michele Sollecito and Aditya Sofat will be talking through Coroutines and flows in Kotlin.
7:15-7:30 pm – Short interval – Drinks/ Pizza
7:30-8:15 pm - Duncan McGregor and Dmitry Kandalov presenting Dependency Injection: Refactoring from Spring to Kotlin
8:15 pm onwards – The Fox - Drinks/ Networking - We'll put money behind the bar :)
Some more details on the talks below...
Michele Sollecito and Aditya Sofat - Coroutines and flows in Kotlin.
Overview of Coroutines theory/Why?
- Implementation of Continuation
- Light weight Threads
- Suspension Points
Use Case
- non blocking/async programming
Practical Use Demonstrating
- Coroutine Builders - ( DefaultDispatcher and how to change Thread Pool)
- async/await use case
suspend fun loadAndCombine(name1: String, name2: String): Image {
val deferred1 = async( loadImage(name1))
val deffered2 = async( loadImage(name1))
return combinedImage(deffered1.await(), deffered2.await())
}
Using Job and SupervisorJob to show the difference as well as Job Cancellation
Coroutine Structured Concurrency
Flows
- Hot vs Cold
- Built-in back pressure handling
- Changing Dispatcher
- MutableSharedFlow example
Duncan McGregor and Dmitry Kandalov - Dependency Injection: Refactoring from Spring to Kotlin
Dependency injection libraries and frameworks seem to be so common these days that even the simplest projects start with introducing a DI framework. There are some good reasons to use DI frameworks, but in general, they can be less useful than expected. In this live coding session, I will take you on a refactoring journey moving a small web application from Spring to pure Kotlin. You will see how using modern language constructs can help achieve most benefits of DI frameworks without the need for reflection or compiler plugin magic.