Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
100
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
130
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
370
dnx で実行できるコマンド、作ってみました
tomohisa
0
140
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
680
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
230
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
340
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
2
590
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
290
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
200
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
380
AIコーディングエージェント(NotebookLM)
kondai24
0
160
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Balancing Empowerment & Direction
lara
5
790
Making Projects Easy
brettharned
120
6.5k
Navigating Team Friction
lara
191
16k
4 Signs Your Business is Dying
shpigford
186
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Become a Pro
speakerdeck
PRO
30
5.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Visualization
eitanlees
150
16k
Writing Fast Ruby
sferik
630
62k
The Cult of Friendly URLs
andyhume
79
6.7k
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