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
Construindo o primeiro app usando Kotlin
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Filipe Guedes
September 06, 2016
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Construindo o primeiro app usando Kotlin
Filipe Guedes
September 06, 2016
Transcript
18 slides
Construindo o primeiro app usando Kotlin Filipe Guedes Philipe Steiff
@fgsguedes @philipesteiff
Por que Kotlin? • Concisa, simples e fácil de ler/escrever
• 100% "two-way" interoperável com Java • Também é funcional • Null-safety • Extension functions • It's fun
class Foo { fun sum(a: Int, b: Int): Int
{ return a + b } fun printSum(a: Int, b: Int): Unit { print(a + b) } }
class Foo { fun sum(a: Int, b: Int) =
a + b fun printSum(a: Int, b: Int) { print(a + b) } }
val a: Int = 1 val b = 1
var c = "Any variable" val d = Foo()
Null Safety var a: String = "abc"
Null Safety var a: String = "abc" a = null
Null Safety var a: String = "abc" a = null
// compilation error
Null Safety var a: String = "abc" a = null
// compilation error println(a.length)
Null Safety var a: String? = "abc" a = null
println(a.length)
Null Safety var a: String? = "abc" a = null
println(a.length) // compilation error
Null Safety var a: String? = "abc" a = null
println(a?.length)
Null Safety var a: String? = "abc" a = null
println(a?.length) // will print 'null'
Null Safety var a: String? = "abc" a = null
println(a?.length ?: "Was null") // will print 'Was null'
Null Safety var a: String? = "abc" a = null
println(a!!.length) // XGH
Extensions fun Parcel.readBoolean() = readByte() > 0 fun Parcel.writeBoolean(boolean:
Boolean) { when { boolean -> writeByte(1) else -> writeByte(0) } } override fun writeToParcel(parcel: Parcel, p1: Int) { parcel.writeBoolean(myBooleanField) } myBooleanField = parcel.readBoolean()
Quem está usando!?
Some live coding!! Wish us luck
More Decks by Filipe Guedes
See All by Filipe Guedes
Kotlin & Android, Java é opcional
fgsguedes
2
130
Other Decks in Programming
See All in Programming
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
250
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
9
4.9k
Canvas 2D Context Next
petamoriken
0
460
Crash Auto Pipelines
veronikapj
1
450
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
250
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
510
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
700
protojson における文字化けの扱い
kazuki1023
0
470
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
640
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
For a Future-Friendly Web
brad_frost
184
11k
How GitHub (no longer) Works
holman
316
150k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Unsuck your backbone
ammeep
672
58k
Statistics for Hackers
jakevdp
799
230k
Designing Experiences People Love
moore
143
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k