Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Kotlin on the Cloud
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
8.1k
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
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
260
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
Press start. Python's next generation.
willingc
PRO
3
330
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
310
信頼性の目標を誰も求めてない
shubox
0
500
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
490
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
280
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
300
typoなんかねぇよ
raspython3
0
680
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
130
業務時間外もAIに働いてもらう話
colorful12
3
10k
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
290
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Un-Boring Meetings
codingconduct
0
410
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
30 Presentation Tips
portentint
PRO
1
390
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Making the Leap to Tech Lead
cromwellryan
135
10k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
500
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
WCS-LA-2024
lcolladotor
0
820
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
202
76k
Technical Leadership for Architectural Decision Making
baasie
3
560
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?