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 on the Cloud
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
João Carvalho
October 12, 2017
Programming
490
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin on the Cloud
Slides for my 'Kotlin on the Cloud' talk at the Google Developer Group Lisboa's Kotlin Night.
João Carvalho
October 12, 2017
More Decks by João Carvalho
See All by João Carvalho
Kotlin - Not you grandfather's Java
joaopecarvalho
0
7.9k
Jigsaw - The Modular JDK
joaopecarvalho
0
3.7k
Bringing a Legacy Java Application to 2015
joaopecarvalho
0
2.5k
Fenix 3
joaopecarvalho
1
400
Developing Modular Web Applications
joaopecarvalho
0
190
Other Decks in Programming
See All in Programming
関数型プログラミングのメリットって何だろう?
wanko_it
0
120
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.6k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
240
1B+ /day規模のログを管理する技術
broadleaf
0
120
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
330
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
AIエージェントで 変わるAndroid開発環境
takahirom
1
340
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
230
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
290
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
130
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.7k
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
260
So, you think you're a good person
axbom
PRO
2
2.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
A Modern Web Designer's Workflow
chriscoyier
698
190k
It's Worth the Effort
3n
188
29k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
600
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Transcript
Kotlin on the Cloud João Carvalho - GDG Lisboa -
Oct 12 2017
About me
About me • Senior Developer / Team Lead @ Talkdesk
• Backend Developer • IST Alumni (Student & Developer) • PT.JUG Speaker • Follow me on Twitter @johnkarva
Cloud Native Apps https://pivotal.io/cloud-native
“Cloud-native is an approach to building and running applications that
fully exploits the advantages of the cloud computing delivery model. Cloud-native is about how applications are created and deployed, not where.”
• Devops • Continuous Delivery • Microservices • Containerization
Predictability
12 Factor App 1. Single codebase, multiple deploys 2. Explicit
Dependencies 3. Store Config in Environment 4. Backing Services as resources 5. Separate Build, Release, Execution 6. Standalone (Volatile) Process 7. Port Binding 8. Multiple Process Types 9. Disposability 10. Environment Parity 11. Logs as Event Streams 12. One-off Admin Tasks
OS-Agnostic
Auto-Scaling
Independence
Quick Recovery
Agility
Kotlin
Why not Java 8/9?
Null Safety
public void printName(Person person) { System.out.println(person.getName()); }
public void printName(Person person) { System.out.println(person.getName()); } null
None
fun printName(person: Person) { println(person.name) }
printName(null) ERROR: Null cannot be a value of non-null type
Person.
fun printName(person: Person?) { if (person != null) { println(person.name)
} }
Safe Navigation
private String safeGetName(Person person) { return person == null ?
null : person.getName(); }
fun safeGetName(person: Person?): String? { return person?.name }
fun safeGetName(person: Person?): String { return person?.name ?: "Unknown" }
Properties
class Person(name: String) { private val name: String init {
this.name = name } }
class Person(private val name: String)
Delegated Properties
val lazyValue: String by lazy { println("computed!") "Hello" }
Extension Functions
fun String.helloize() = "Hello $this" "World".helloize()
Data Classes
public class Person { private String name; private int age;
public Person(String name, int age) { this.name = name; this.age = age; } (...) }
public String getName() { return name; } public void setName(String
name) { this.name = name; } @Override public boolean equals(Object o) { (Stuff generated by your IDE) } @Override public int hashCode() { int result = name.hashCode(); result = 31 * result + age; return result; }
None
data class Person(var name: String, var age: Int)
data class Person(val name: String, val age: Int)
val john = Person("John", 21) val olderJohn = john.copy(age =
78)
And much more... • No Semicolons! • Lambda Expressions and
Inline Functions • Type inference • Named Arguments • Default Values • String Interpolation • Ranges • Immutable Collections (Kind of) • Collection helpers • Infix Functions • DSL Support
Performance
Tooling
Getting Started
None
None
None
None
@RestController @SpringBootApplication public class DemoApplication { public static void main(String[]
args) { SpringApplication.run(DemoApplication.class, args); } @GetMapping("/hello") public String hello() { return "Hello World!"; } }
http://shop.oreilly.com/product/0636920038252.do
Cloud-Native Kotlin?
None
https://docs.spring.io/spring/docs/current/spring-framework-reference/kotlin.html
Demo Time!
Questions?