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
Construindo o primeiro app usando Kotlin
Search
Filipe Guedes
September 06, 2016
Programming
0
110
Construindo o primeiro app usando Kotlin
Filipe Guedes
September 06, 2016
Tweet
Share
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
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
120
What's new in Spring Modulith?
olivergierke
1
150
All About Angular's New Signal Forms
manfredsteyer
PRO
0
170
Devoxx BE - Local Development in the AI Era
kdubois
0
130
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
550
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
290
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
610
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
210
Serena MCPのすすめ
wadakatu
4
1k
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
2
420
オープンソースソフトウェアへの解像度🔬
utam0k
16
3k
Six and a half ridiculous things to do with Quarkus
hollycummins
0
180
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Optimizing for Happiness
mojombo
379
70k
The Invisible Side of Design
smashingmag
302
51k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
BBQ
matthewcrist
89
9.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Designing for Performance
lara
610
69k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Bash Introduction
62gerente
615
210k
Transcript
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