Kotlin for Android
Prepared by Shady Selim
@Kotlin.Cairo #Kotlin @Helwan.GDG #GDG_Helwan
+
Speaker Bio
• Official Google Speaker
• GDG Helwan Founder & Leader
• Kotlin Cairo User Group Founder
• Mentor in Udacity Nanodegree
• Mobile & Web Evangelist
• Technology savvy
• Think tank
• UI/UX freak
www.linkedin.com/in/shadyselim/
@dr_Shady_Selim
2
+
Who created Kotlin?
• IntelliJ IDEA
• PhpStorm
• ReSharper
• PyCharm
• RubyMine
• … others
3
+
What is Kotlin?
4
+
Why Kotlin Now?
5
+
6
+
Is Kotlin Really new?
7
+
Why Should I care!!?
• Statically typed programming language targeting the JVM
• Support for functional and OO paradigms
• Pragmatic, safe, concise, great Java interop
• Free and open-source
• Drastically reduce the amount of boilerplate code
• Lambda expression
• Avoid entire classes of errors such as null pointer exceptions
• Java 9 is …
8
+
The Strengths of Kotlin
• Modeling the data of your application concisely and expressively
• Creating reusable abstractions using functional programming
techniques
• Creating expressive domain-specific languages (DSL)
• Java interop ensures that all existing Java frameworks can be used
• No rewrite required to start using Kotlin in existing codebase
• Existing investment is fully preserved
9
+
Java Model Example
10
+
Java Model Example, cont.
11
+
Java Model Example, cont.
12
+
Kotlin Model Example, cont.
13
+
The Strength Points
14
+
• In addition to all what was mentioned
• Extensions
• Anko (Commons, Layouts, SQLite, & Coroutines)
• No new
• No semi colon
• Smart casting
• Great IDE and tooling supports
• Variables (val vs. var)
• functions
Do you like reactive programming?
15
+
Missing your frameworks or libraries!?
16
+
Missing your frameworks or libraries!?
17
+
Missing your frameworks or libraries!?
18
+
Missing your frameworks or libraries!?
19
+
kotlin.link
20
+
Resources
• https://kotlinlang.org/
• https://m.signalvnoise.com/kotlin-its-the-little-things-8c0f501bc6ea
• https://www.jetbrains.com/
• https://www.slideshare.net/intelliyole/kotlin-why-do-you-care
• https://github.com/ReactiveX/RxKotlin
• https://spring.io/blog/2016/02/15/developing-spring-boot-applications-
with-kotlin
• https://www.slideshare.net/makingx/spring-kotlin
• https://kotlin.link/
• http://www.overrideandroid.info/2017/04/kotlin-do-more-with-less-
code.html
21
+
Questions!?
22
+

Intro to Kotlin