SlideShare a Scribd company logo
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

More Related Content

PDF
Bridget Kromhout - Cloud Native London
PDF
Terraform & IaC - Nam CXN
PDF
Decision making - for loop , nested loop ,if-else statements , switch in goph...
PDF
Quick Review of Desktop and Native Apps using Javascript
PDF
Continuous Delivery - FIT VUT
ODP
What's missing from upstream kernel containers?
ODP
Javascript in Linux Desktop
PDF
HTTP2Study chronicle #http2conf
Bridget Kromhout - Cloud Native London
Terraform & IaC - Nam CXN
Decision making - for loop , nested loop ,if-else statements , switch in goph...
Quick Review of Desktop and Native Apps using Javascript
Continuous Delivery - FIT VUT
What's missing from upstream kernel containers?
Javascript in Linux Desktop
HTTP2Study chronicle #http2conf

What's hot (7)

PDF
Types - slice, map, new, make, struct - Gopherlabs
PDF
Use MQTT in Docker on Raspberry Pi
ODP
Not so brief history of Linux Containers
PDF
GUI Programming with Perl / GTK
PDF
Developing GNOME Apps in Javascript
PDF
Building Multi-platform Video Games for the Cloud
PPT
Types - slice, map, new, make, struct - Gopherlabs
Use MQTT in Docker on Raspberry Pi
Not so brief history of Linux Containers
GUI Programming with Perl / GTK
Developing GNOME Apps in Javascript
Building Multi-platform Video Games for the Cloud
Ad

Similar to Kotlin everywhere: share your kotlin code across platforms (20)

PDF
A Review Paper on Kotlin Programming Language
PPTX
Kotlin- Programming Language For Modern Multi-Platform Applications
PDF
Isomorphic Kotlin
PDF
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
PDF
A Brief Overview of Kotlin
PDF
JavaOne 2016 - Kotlin: The Language of The Future For JVM?
PPTX
Understand What and Why Kotlin.pptx
PDF
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
PDF
Programming with Kotlin
PPTX
Future of Kotlin - How agile can language development be?
PDF
A short introduction to the Kotlin language for Java developers
PPTX
Desarrollo multiplataforma con kotlin | UPV 2018
PDF
Kotlin for android development
PDF
Kotlin - A Beginner’s Guide__________________
PDF
Kotlin in the age of digital transformation
PDF
What is Kotlin.pdf
PDF
Rapid Web API development with Kotlin and Ktor
PPTX
The-Future-of-Kotlin-What-Developers-Need-to-Know.pptx
A Review Paper on Kotlin Programming Language
Kotlin- Programming Language For Modern Multi-Platform Applications
Isomorphic Kotlin
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
A Brief Overview of Kotlin
JavaOne 2016 - Kotlin: The Language of The Future For JVM?
Understand What and Why Kotlin.pptx
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
Programming with Kotlin
Future of Kotlin - How agile can language development be?
A short introduction to the Kotlin language for Java developers
Desarrollo multiplataforma con kotlin | UPV 2018
Kotlin for android development
Kotlin - A Beginner’s Guide__________________
Kotlin in the age of digital transformation
What is Kotlin.pdf
Rapid Web API development with Kotlin and Ktor
The-Future-of-Kotlin-What-Developers-Need-to-Know.pptx
Ad

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
introduction to datamining and warehousing
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
Construction Project Organization Group 2.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
web development for engineering and engineering
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
introduction to datamining and warehousing
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Construction Project Organization Group 2.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CH1 Production IntroductoryConcepts.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
R24 SURVEYING LAB MANUAL for civil enggi
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Operating System & Kernel Study Guide-1 - converted.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
web development for engineering and engineering
Internet of Things (IOT) - A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx

Kotlin everywhere: share your kotlin code across platforms