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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Roberto Orgiu
July 20, 2018
Technology
87
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
87
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
100
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
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
220
なぜ私たちのSREプラクティスはなかなか機能しないのか 〜システムより先に組織を見る〜 / Why our SRE practices aren't really working
vtryo
0
160
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
490
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
250
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
330
NDIAS CTF 2026 問題解説会資料
bata_24
0
170
SRE歴2ヶ月でも開発6年の知見を活かして、チームで止まっていた環境改善を前に進めた話
a_ono
0
180
Tech-Verse 2026_Keynote
lycorptech_jp
PRO
0
130
cccccc
moznion
0
1.7k
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
290
Kotlin 開発のツラミを爆破した話! / Explode the difficulty of Kotlin dev!
eller86
0
140
どうして今サーバーサイドKotlinを選択したのか
nealle
0
190
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
180
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
RailsConf 2023
tenderlove
30
1.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
480
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Writing Fast Ruby
sferik
630
63k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
How to build a perfect <img>
jonoalderson
1
5.8k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Documentation Writing (for coders)
carmenintech
77
5.4k
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