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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
João Carvalho
October 12, 2017
Programming
1
470
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
Tweet
Share
More Decks by João Carvalho
See All by João Carvalho
Kotlin - Not you grandfather's Java
joaopecarvalho
0
7.7k
Jigsaw - The Modular JDK
joaopecarvalho
0
3.7k
Bringing a Legacy Java Application to 2015
joaopecarvalho
0
2.5k
Fenix 3
joaopecarvalho
1
390
Developing Modular Web Applications
joaopecarvalho
0
180
Other Decks in Programming
See All in Programming
AHC061解説
shun_pi
0
410
へんな働き方
yusukebe
5
2.8k
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
130
AI活用のコスパを最大化する方法
ochtum
0
280
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
670
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
140
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
170
Java 21/25 Virtual Threads 소개
debop
0
240
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
320
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.3k
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.3k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
210
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
0
290
Accessibility Awareness
sabderemane
0
84
Raft: Consensus for Rubyists
vanstee
141
7.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Site-Speed That Sticks
csswizardry
13
1.1k
Balancing Empowerment & Direction
lara
5
960
Mind Mapping
helmedeiros
PRO
1
130
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Designing for Performance
lara
611
70k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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?