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
0
73
Kotlin Everywhere
Roberto Orgiu
July 20, 2018
Tweet
Share
More Decks by Roberto Orgiu
See All by Roberto Orgiu
Wellness & Droid
tiwiz
0
120
Behind the curtains
tiwiz
0
63
The Importance of Being Tested
tiwiz
0
420
An Android Dev start to Kotlin MPP
tiwiz
0
180
Fantastic API and where to find them
tiwiz
0
76
Flipping the Koin @ GDG Dev Party
tiwiz
1
72
Flipping the Koin
tiwiz
2
160
Trip into the async world @ NYC Kotlin Meetup
tiwiz
0
120
Trip into the async world
tiwiz
1
140
Other Decks in Technology
See All in Technology
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
260
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Cosmos World Foundation Model Platform for Physical AI
takmin
0
870
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
130
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.3k
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
2.2k
AWS Network Firewall Proxyを触ってみた
nagisa53
1
230
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
For a Future-Friendly Web
brad_frost
182
10k
Mobile First: as difficult as doing things right
swwweet
225
10k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
The browser strikes back
jonoalderson
0
370
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
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