Droidcon Berlin 2021 - With coroutines being the de facto way of exposing async work and streams of changes for Kotlin on Android, developers are obviously attempting to use the same approaches when moving their code to Multiplatform.
But due to the way the memory model differs between JVM and Kotlin Native, it can be a painful experience.
In this talk, we will take a deep dive into the Coroutine API for Kotlin Multiplatform. You will learn how to expose your API with Coroutines while working with the Kotlin Native memory model instead of against it, and avoid the dragons along the way.
Droidcon Berlin 2021 - With coroutines being the de facto way of exposing async work and streams of changes for Kotlin on Android, developers are obviously attempting to use the same approaches when moving their code to Multiplatform.
But due to the way the memory model differs between JVM and Kotlin Native, it can be a painful experience.
In this talk, we will take a deep dive into the Coroutine API for Kotlin Multiplatform. You will learn how to expose your API with Coroutines while working with the Kotlin Native memory model instead of against it, and avoid the dragons along the way.
As a part of kotlinx.coroutines 1.2 Flow was introduced as a cold asynchronous data stream. How does it work? What we can do with it? Is it that we waiting so long for replacing Rx? The talk has answers to them.
KMM survival guide: how to tackle struggles between Kotlin and SwiftCommit University
Kotlin Multiplatform Mobile (KMM) è un SDK per lo sviluppo di applicazioni Android ed iOS che consente agli sviluppatori di condividere la business logic mantenendo UI/UX native.
Ogni SDK/framework cross/multi platform ha i suoi pro ed i suoi contro, e purtroppo KMM non è l'eccezione che conferma la regola.
Se sei uno sviluppatore Android potresti pensare che tutto funzionerà correttamente, ma purtroppo non sarà così quando dovrai confrontarti con Swift.
Se sei uno sviluppatore iOS saprai che Swift è simile a Kotlin, ma non in tutto, dovrai quindi conoscere alcune sue caratteristiche.
In questo talk vedremo quali sono i problemi che si possono riscontrare nell'interoperabilità tra Kotlin e Swift, i motivi che li causano, e come risolverli.
Blazing Fast, Pure Effects without Monads — LambdaConf 2018John De Goes
Effect monads like IO are the way functional programmers interact with the real world. Yet, monadic effects in programming languages like Scala often perform poorly compared to their Haskell counterparts—as much as 10x slower in some benchmarks. In this presentation, John A. De Goes, author of the Scalaz 8 effect system, dredges up an old paper to cast new light on the question of how to model effects, and comes to the surprising conclusion that in Scala, monads may not be the fastest way to model purely functional effects. Join John as he shows a new model of effects that offers performance improvements without sacrificing the wonderful purity that functional programmers rely on to reason about their software.
In this tutorial on Kotlin Jetpack, we will learn why Jetpack compose, What is Kotlin Jetpack compose, and How does compose works?. We will also learn about Composable function, Layouts, and material design. At last, we will have a look at the List and animations.
What is Kotlin Jetpack compose?
Why Jetpack compose?
How does the compose work?
Composable function
Layouts
Material design
List and animations
Kotlin scope functions:
Kotlin standard library has extension functions that execute a block of code on Object and they provide a scope using lambda expression that’s why they are called Scope Functions.
Types
1) let
2) run
3) with
4) apply
5) also
Jetpack Compose is the new Android UI framework that allows you to create rich user interfaces in a declarative way using Kotlin language. In this presentation, it will be demonstrated how to take the first steps with Compose, learn its main concepts and understand how to be prepared for this change of paradigm on the front-end development of native Android applications.
As a part of kotlinx.coroutines 1.2 Flow was introduced as a cold asynchronous data stream. How does it work? What we can do with it? Is it that we waiting so long for replacing Rx? The talk has answers to them.
KMM survival guide: how to tackle struggles between Kotlin and SwiftCommit University
Kotlin Multiplatform Mobile (KMM) è un SDK per lo sviluppo di applicazioni Android ed iOS che consente agli sviluppatori di condividere la business logic mantenendo UI/UX native.
Ogni SDK/framework cross/multi platform ha i suoi pro ed i suoi contro, e purtroppo KMM non è l'eccezione che conferma la regola.
Se sei uno sviluppatore Android potresti pensare che tutto funzionerà correttamente, ma purtroppo non sarà così quando dovrai confrontarti con Swift.
Se sei uno sviluppatore iOS saprai che Swift è simile a Kotlin, ma non in tutto, dovrai quindi conoscere alcune sue caratteristiche.
In questo talk vedremo quali sono i problemi che si possono riscontrare nell'interoperabilità tra Kotlin e Swift, i motivi che li causano, e come risolverli.
Blazing Fast, Pure Effects without Monads — LambdaConf 2018John De Goes
Effect monads like IO are the way functional programmers interact with the real world. Yet, monadic effects in programming languages like Scala often perform poorly compared to their Haskell counterparts—as much as 10x slower in some benchmarks. In this presentation, John A. De Goes, author of the Scalaz 8 effect system, dredges up an old paper to cast new light on the question of how to model effects, and comes to the surprising conclusion that in Scala, monads may not be the fastest way to model purely functional effects. Join John as he shows a new model of effects that offers performance improvements without sacrificing the wonderful purity that functional programmers rely on to reason about their software.
In this tutorial on Kotlin Jetpack, we will learn why Jetpack compose, What is Kotlin Jetpack compose, and How does compose works?. We will also learn about Composable function, Layouts, and material design. At last, we will have a look at the List and animations.
What is Kotlin Jetpack compose?
Why Jetpack compose?
How does the compose work?
Composable function
Layouts
Material design
List and animations
Kotlin scope functions:
Kotlin standard library has extension functions that execute a block of code on Object and they provide a scope using lambda expression that’s why they are called Scope Functions.
Types
1) let
2) run
3) with
4) apply
5) also
Jetpack Compose is the new Android UI framework that allows you to create rich user interfaces in a declarative way using Kotlin language. In this presentation, it will be demonstrated how to take the first steps with Compose, learn its main concepts and understand how to be prepared for this change of paradigm on the front-end development of native Android applications.
How I make a podcast website using serverless technology in 2023Shengyou Fan
In 2022, I launched a Kotlin podcast show, Kotlin Fireside Chat, with my friends in Kotlin User Group. Now, we're taking things to the next level by building a podcast website with a statistical analysis dashboard. We've built a static website using Jamstack and connected it to a serverless API written in Kotlin. In order to aggregate the listener number across platforms, such as YouTube, BiliBili, Ximalaya, Lizhi, Qingting, we've also created a crawler to grab those numbers and display them in a custom dashboard. Everything is made by open source technology and deployed on Google Cloud Platform. In this talk, I'll share my experience and the lessons I learned when using all the technologies in 2023.
Using the Exposed SQL Framework to Manage Your DatabaseShengyou Fan
Exposed is a SQL framework made by the JetBrains team. It has two styles, one is type-safe SQL wrapping DSL, and one is DAO. In this sharing, we will talk about how to use Exposed to connect to the database, running CRUD operation in database in two different styles. Furthermore, we will demonstrate how to integrate into Ktor project.
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率Shengyou Fan
Spring Boot 一直是 Java 開發生態系裡市佔率最高的框架,許多企業都採用其開發自身服務。隨著開發典範的轉移,即便 Spring 提供完整方案,開發者往往對架構修改及服務管理的工作怯步,是否移轉上雲也有所疑慮。在這場分享裡,將會介紹由 Azure 提供的 Spring Cloud 解決方案,並從最簡單的一個 Spring Boot 應用開始,逐步導入微服務架構、連接 Azure DB、藍綠部署到服務監控,讓開發者了解使用 Azure 運行 Spring 是一個簡單又有效率的體驗,加速將 JVM 應用上雲。
9. Server Web Desktop Android iOS
OS API Browser API OS API Android API iOS API
以 Kotlin Multiplatform 共⽤業務邏輯
Android View SwiftUI
使⽤ Kotlin Multiplatform 技術開發雙平台 Mobile App
—
Kotlin Multiplatform Mobile
13. 透過 Compose Multiplatform 共⽤ UI
—
Server Web Desktop Android iOS
OS API Browser API OS API Android API iOS API
以 Kotlin Multiplatform 共⽤業務邏輯
以 Compose Multiplatform 共⽤ UI
Android View
Swing SwiftUI
Compose Multiplatform
17. 擴⼤ Compose Multiplatform 版圖
—
Server Web Desktop Android iOS
OS API Browser API OS API Android API iOS API
以 Kotlin Multiplatform 共⽤業務邏輯
Android View
Swing SwiftUI
Compose Multiplatform
以 Compose Multiplatform 共⽤ UI
以 Compose Multiplatform 共⽤ UI
46. 後端 API 服務
—
Server Client
語法簡單
輕量
適合做微服務
HTTP Client
⽀援多平台
搭配 kotlinx.serialization 做 SDK
47. 共⽤ Data Class
—
@Serializable
data class LoginRequest(
val username: String,
val password: String,
)
@Serializable
data class LoginResponse(
val result: Boolean,
val message: String,
val user: User? = null,
)
@Serializable
data class User(
val id: Int,
val username: String,
val password: String,
val email: String,
val displayName: String,
val profileImageUrl: String,
)
48. Ktor Server
—
fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0") {
install(ContentNegotiation) {
json()
}
// Ktor plugins
configureLogin()
}.start(wait = true)
}
49. 實作 API Service
—
fun Application.configureLogin() {
routing {
post("...") {
// 接收 HTTP Request
// 反序列化成 Data Class
val req = call.receive<LoginRequest>()
// 登入驗證程式碼
// 回傳 HTTP Response
call.respond(
LoginResponse(
result = ...,
message = "...",
user = loggedInUser,
)
)
}
}
}
51. Kotlin Multiplatform 全版圖
—
Server Web Desktop Android iOS
OS API Browser API OS API Android API iOS API
以 Kotlin Multiplatform 共⽤業務邏輯
以 Compose Multiplatform 共⽤ UI
Android View
Swing SwiftUI