Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin Everywhere
Search
Roberto Orgiu
July 20, 2018
Technology
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin Everywhere
Roberto Orgiu
July 20, 2018
More Decks by Roberto Orgiu
See All by Roberto Orgiu
Wellness & Droid
tiwiz
0
140
Behind the curtains
tiwiz
0
89
The Importance of Being Tested
tiwiz
0
450
An Android Dev start to Kotlin MPP
tiwiz
0
210
Fantastic API and where to find them
tiwiz
0
110
Flipping the Koin @ GDG Dev Party
tiwiz
1
79
Flipping the Koin
tiwiz
2
180
Trip into the async world @ NYC Kotlin Meetup
tiwiz
0
130
Trip into the async world
tiwiz
1
150
Other Decks in Technology
See All in Technology
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
0
360
猫付きpingコマンドを自作
uyuki234
0
280
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
1
300
My broken English still works: speaking at global OSS events
naruoga
0
120
会社紹介資料 / Sansan Company Profile
sansan33
PRO
24
430k
強化学習「理論」入門
enakai00
3
3.6k
2027年のMetricKit
kantacky
0
130
AIのためのEthernet技術動向 (SerDes)
markunet
1
250
AI・HPC開発を支えるGPU環境の新しい選択肢 液冷GPUシステム「AquSys」の取り組み
gpuunite_official
0
160
DDDのエッセンスを取り入れたAIでの開発
ak2ie
0
170
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
100
Featured
See All Featured
A better future with KSS
kneath
240
18k
It's Worth the Effort
3n
188
29k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
470
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
640
Technical Leadership for Architectural Decision Making
baasie
3
510
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
Transcript
Kotlin everywhere
Who’s speaking Rob @ NYT Boris @ ClearScore 2
#CPIT2 sli.do Join the discussion
Where https://pusher.com/state-of-kotlin
Desktop apps with a little bit of Tornado™
• JavaFX • Beautiful DSL • UI + Background thread
• Injection • REST • Field validation • Can work™ with JS TornadoFX 6
tornadofx.io goo.gl/qSjBPG goo.gl/gcrZss
iOS apps and Android (but we wanted the WOW moment)
Kotlin Native COMMON no platform specific dependencies class/function declaration 9
PLATFORM implementations of platform-dependent declarations in the common module always an implementation of a single common module REGULAR targets specific platform can be dependency of platform modules can depend on platform modules
10
◇ common module defines expected declarations ◇ expected declarations never
contain any implementation code 11 expected
12 actual ◇ platform module provides actual declarations ◇ actual
declarations must match expected declarations
13 package org.jetbrains.foo expect class Foo(bar: String) { fun frob()
} fun main(args: Array<String>) { Foo("Hello").frob() }
14 package org.jetbrains.foo actual class Foo actual constructor(val bar: String)
{ actual fun frob() { println("Frobbing the $bar") } }
JVM Backend
16
Javascript Both Frontend and Backend!
18
19
◇ You can set and call everything you want on
properties of this type ◇ Disables compiler checks (beware of runtime errors) 20 dynamic
◇ Kotlin assumes the implementation is provided by the developer
(in JS) ◇ The compiler will not generate JS code for this function ◇ No auto completion 21 external
22 external fun require(module: String): dynamic fun main(args: Array<String>) {
val app = require(“express”) app.get(“/hello”, {req, res -> res.send(“Hello world!”) }) }
} 23 { Kotlin wrappers
24 @JsModule(“express”) external class Express { fun get( route: String,
callback: (req: Request, res: Response) -> Unit ) external class Request external class Response { fun send(data: String) } }
} 25 { Kotlin wrappers https://github.com/JetBrains/kotlin-wrappers
Thanks! Any questions? You can find us at: ◇ @_tiwiz
◇ @borisdamato 26