Kotlin - Why, How and When and Android
Kotlin - Why, How and When and Android
2
Why move to
Kotlin?
Less codes, less crash, nicer
codebase.
3
“
Kotlin is very concise.
Drastically reduce the amount
of boilerplate code.
4
“
Saves a lot more time to get
more sleep.
5
In Java we write...
6
And In Kotlin...
7
“
Get more with less code =
Decreased dev time and cost.
8
“
That’s why many big companies
are moving to Kotlin
9
Safe
Avoid
NullPointerException.
The Billion Dollar
mistake
10
The Pyramid of Doom...
if(pyramid != null){
if(sheep != null){
if(you != null){
}
11
... will be replaced with this!
12
Less Verbose code
Kotlin requires less numbers of code
compared to Java.
Java
private String s1 = "my string 1";
private final String s2 = "my string 2";
private static final String s3 = "my string 3";
Kotlin
var s1 = "my string 1"
val s2 = "my string 2"
val s3 = """my string 3"""
13
When should you move to
Kotlin?
ANYTIME!
14
Because
Kotlin costs
nothing to adapt
15
One-click Java to Kotlin converter.
3 seconds task and 90-99% code
coverage!
16
Both languages can be used on the same
project.
Convenient
17
Kotlin can use existing Java libraries.
Availability
18
Kotlin Helps Android Development
faster, convenient and most importantly
Awesome
19
Anko is a Kotlin library which makes
Android application development faster
and easier. It makes your code clean and
easy to read, and lets you forget about
rough edges of the Android SDK for
Java.
20
With Java
With Kotlin
21
Let’s Try...
22
Thanks!
Any questions?
23