Kotlin: What you
need to know
Android Development with Kotlin v1.0 ThisThis workwork isislicensedlicensed underunder thethe
ApacheApache 2
2licenselicense.. 1
1
1
Umar SaiduAuna
Software Engineer, gidimo
tech community Organizer
umarauna
November 24, 2021
What mostly happen to JAVA programmers before Kotlin
otlin history
History
Kotlin is a cross-platform, statically typed, general-purpose
programming language and runs on the JVM
History
Kotlin is a cross-platform, statically typed, general-purpose
programming language and runs on the JVM.
Kotlin was developed by JetBrains (Makers of IntelliJ)
History
Kotlin is a cross-platform, statically typed, general-purpose programming language and
runs on the JVM.
Kotlin was developed by JetBrains (Makers of IntelliJ)
First commit dates back to 2010, but was first publicly seen around 2011.
History - Why did Google make it official?
Awesome features - nullable types, concise, data classes, etc.
Great community support
There was an overwhelming request for Kotlin
official support on Android
otlin What?
What is Kotlin
Kotlin is a cross-platform, statically typed, general-purpose programming
language, it is also JVM based language developed by JetBrains as
described before, a company known for the creation of IntelliJ IDEA, a
powerful IDE for Java development. In Kotlin everything is an Object.
What is Kotlin
Kotlin is a cross-platform, statically typed, general-purpose programming
language, it is also JVM based language developed by JetBrains as
described before, a company known for the creation of IntelliJ IDEA, a
powerful IDE for Java development. In Kotlin everything is an Object.
Kotlin is very intuitive and easy to learn for Java developers
(give it 10 days trials and you wont regret).
What is Kotlin
Kotlin is a cross-platform, statically typed, general-purpose programming
language, it is also JVM based language developed by JetBrains as
described before, a company known for the creation of IntelliJ IDEA, a
powerful IDE for Java development. In Kotlin everything is an Object.
Kotlin is very intuitive and easy to learn for Java developers
(give it 10 days trials and you wont regret).
Its more expressive & safer
What is Kotlin
Kotlin is a cross-platform, statically typed, general-purpose programming
language, it is also JVM based language developed by JetBrains as
described before, a company known for the creation of IntelliJ IDEA, a
powerful IDE for Java development. In Kotlin everything is an Object.
Kotlin is very intuitive and easy to learn for Java developers
(give it 10 days trials and you wont regret).
Its more expressive & safer
Its highly interoperable
otlin interesting
features
“In Kotlin, everything is an object
(reference type), we don’t find primitives
types as the ones we can use in
Java……...”
#1 Fastest growing language
Companies Using Kotlin
Companies Using Kotlin
Job requirements
implemeantation 'com.github.UmarAuna:Carousels-Kotlin:0.0.2'
http://bit.ly/kotlin-image-carousel
Kotlin sample code…..
fun main(args: Array<String>){
//your code goes here
}
Kotlin 1.3 no more (args: Array<String>)
fun main(){
// your code goes here
}
Null Safety - nullable types and non-nullable types
Tony Hoare, one of the creators of the programming language ALGOL.
Protects against NullPointerException the $1,000,000,000 mistake
Null Safety - nullable types and non-nullable types
Tony Hoare, one of the creators of the programming language ALGOL.
Protects against NullPointerException the $1,000,000,000 mistake
A non-nullable object can’t be null
// compiler error
var name: String
name = null
Null Safety - nullable types and non-nullable types
Tony Hoare, one of the creators of the programming language ALGOL.
Protects against NullPointerException the $1,000,000,000 mistake
A non-nullable object can’t be null
// compiler error
var name: String
name = null
Specify a nullable object by using “?”
// compiler error
var name: String?
val length = name.length Kotlin ensures that you don’t mistakenly operate on nullable objects
Null Safety - Accessing properties in a nullable object
1. Checking for null types
// handle non-null case and null case
var name: String? = null
val length = if (name != null) name.length else 0
Null Safety - Accessing properties in a nullable object
2. Making safe calls using “?.”
//use ?. to make safe call
var name: String?
...
val length = name?.length
Use ?. to safely access a property/method on a
nullable object
If name happens to be null, the value of length is 0
(inferred integer).
length would be null if it were of another type.
Null Safety - Accessing properties in a nullable object
3. Making use of the “?:” elvis operator
//use elvis operator
var name: String?
val length = name?.length ?: 0
This reads as “if name is not null, use
name.length else use 0
Elvis Presley. His hairstyle resembles a Question Mark
Null Safety - Accessing properties in a nullable object
4. Making use of the “!!” assertion operator
//use assertion operator
var name: String? = null
val length = name!!.length
This reads as “if name is not null, use
name.length else throw a null pointer
exception”
Null Safety - Accessing properties in a nullable object
4. Making use of the “!!” assertion operator
//use elvis operator
var name: String? = null
val length = name!!.length
This reads as “if name is not null, use
name.length else throw a null pointer
exception”
Be very careful with this operator!!!
Null Safety - NPE free!
You can only have the NullPointerException in Kotlin if:
1. You explicitly throw a NPE
2. You make use of the !! operator
3. An external Java code causes the NPE.
String Interpolation / template in Kotlin
fun hello(name: String) {
println("Hello, $name")
}
String Interpolation in Java + Kotlin
void hello(String name) {
System.out.println("Hello, " + name);
}
Immutability
Kotlin helps developers to be intentional about immutability.
Immutability simply means that things you create can’t be changed.
We need immutability because it:
● helps us with thread safety - no synchronization issues
● is good for value objects - objects that simply hold value, POJOs etc.
● helps debugging threaded applications without losing your hair
Immutability
How does it work in Java?
●Immutability in Java?
final classes
private fields
no setters
● Immutability in Kotlin? Guess?
Immutability
How does Kotlin help?
var vs val
// compiler error: val cannot be reassigned
val name = "Umar"
name = name.toUpperCase()
// works fine
var name = "Umar"
name = name.toUpperCase()
Immutability
How does Kotlin help?
Immutable and Mutable collections
// immutable collection
val unchangeableHobbies = listOf("coding", "hiking")
unchangeableHobbies.add() // add method doesn’t exist
// mutable collection
val changeableHobbies = mutableListOf("reading", "running")
changeableHobbies.add("travelling") // you can add
Immutability
In Java vs Kotlin
public final class ImmutableClassJava {
private final String name;
private final int age;
public ImmutableClassJava(String name, int age) {
this.name = name;
this.age = age;
}
// no setters
public String getName() {
return name;
}
public int getAge() {
return age;
}
}
class ImmutableClassJava(val name: String, val age: Int)
● Class is final by default
●val implies that the parameters are
final as well (values can’t be assigned)
Functions
// function sample
fun sampleFunc() {
// code goes here
}
A function is declared using the “fun”
keyword
Functions
// function sample
fun sampleFunc() {
// code goes here
}
// function with param
fun sampleFuncWithParam(param: String) {
// code goes here
}
A function is declared using the “fun”
keyword
Method parameters use the “name:Type”
notation
Functions
// function sample
fun sampleFunc() {
// code goes here
}
// function with param
fun sampleFuncWithParam(param: String) {
// code goes here
}
// func with param and return type
fun capitalize(param: String): String {
return param.toUpperCase()
}
A function is declared using the “fun”
keyword
Method parameters use the “name:Type”
notation
Return types are specified after the
method definition.
Functions - infix functions
// infix function
infix fun Int.times(x: Int): Int {
return this * x
}
We can use the function as an arithmetic operator, i.e.,
using it without writing dots and parentheses.
Functions - infix functions
// infix function
infix fun Int.times(x: Int): Int {
return this * x
}
// usage
fun useInfix() {
val product = 2 times 5
println(product)
}
We can use the function as an arithmetic operator, i.e.,
using it without writing dots and parentheses.
Functions - extension functions
// extension function
fun Int.square(): Int {
return this * this
}
Extension function is a member function of a class that is
defined outside the class
Functions - extension functions
// extension function
fun Int.square(): Int {
return this * this
}
Extension function is a member function of a class that is
defined outside the class
// usage
fun useExtension() {
val square = 2.square()
println(square)
}
Functions
Others:
● Higher order functions
● Lambdas
● Inline functions etc.
Iterators
Java Kotlin
When Expression
otlin conciseness
Conciseness in Kotlin
public void doSomething() {
// do something
}
fun doSomething(): Unit {
// do same thing
}
Conciseness in Kotlin
public void doSomething() {
// do something
}
fun doSomething(): Unit {
// do same thing
}
Conciseness in Kotlin
public void doSomething() {
// do something
}
fun doSomething() {
// do same thing
}
Conciseness in Kotlin
public String getName() {
return name;
}
fun getName(): String {
return name
}
Conciseness in Kotlin
public String getName() {
return name;
}
fun getName() {
return name
}
Conciseness in Kotlin
public String getName() {
return name;
}
fun getName() = name
otlin class
Class in Java vs Data Class in Kotlin
public class Person {
private String name;
String getName () {
return name;
}
void setName (String name) {
this.name = name;
}
@Override
public String toString () {
return "Person{" +
"name='" + name + ''' +
'}';
}
}
data class Person(val name: String)
Class in Java vs Regular Class in Kotlin
public class Person {
private String name;
String getName () {
return name;
}
void setName (String name) {
this.name = name;
}
public int getNameLength () {
return name.length
}
}
class Person(name: String) {
var name: String
get() = name
set(name) {
this.name = name
}
fun getNameLength(): Int {
return name.length
}
}
Class in Java vs Regular Class in Kotlin
public class Person {
private String name;
String getName () {
return name;
}
void setName (String name) {
this.name = name;
}
public int getNameLength () {
return name.length
}
}
class Person(name: String) {
var name: String
get() = name
set(name) {
this.name = name
}
fun getNameLength() = name.length
}
otlin: getting started
Important place to learn…….
Important place to learn…….
Tutorials Point - Kotlin
Important place to learn…….
Tutorials Point - Kotlin
Kotlin for Android Developers – Antonio Leiva
Important place to learn…….
Tutorials Point - Kotlin
Kotlin for Android Developers – Antonio Leiva
Koans online – try.kotl.in/koans
Important place to learn…….
Tutorials Point - Kotlin
Kotlin for Android Developers – Antonio Leiva
Koans online – try.kotl.in/koans
Kotlin Bootcamp for Programmers - Udacity
Important place to learn…….
Tutorials Point - Kotlin
Kotlin for Android Developers – Antonio Leiva
Koans online – try.kotl.in/koans
Kotlin Bootcamp for Programmers - Udacity
https://developer.android.com/kotlin/learn
Compilations
IDE’s
Build Tools
Stay updated…….
Kotlin Weekly
http://www.kotlinweekly.net/
Kotlin Conf
kotlinconf.com
Summary
• Interoperable with Java (100%)
• Reduces Boilerplate code
• Object-Oriented and procedural
• Safety code
• No Semicolon
• Expands your skillset
• Perfect Support with Android Studio & Gradle
• Very easy to get started with Android Development
otlin: libraries
Reduces Boilerplates codes like:
findViewById, Async, build interfaces
with Kotlin code etc
Kotlin Android Extension it includes a view
binder. The plugin automatically creates a set
of properties that give direct access to all the
views in the XML.
Async Server - Client
Finally
You have 3 Options..
1
Decide Kotlin is not
For you and continue
with Java
Finally
1
Decide Kotlin is not
For you and continue
with Java
You have 3 Options..
2
Try to learn
everything
on your own
Finally
1
Decide Kotlin is not
For you and continue
with Java
You have 3 Options..
3
Go and learn on
MOOC websites
2
Try to learn
everything
on your own
Questions
? Thank
you!
Android Development with Kotlin v1.0 ThisThis workwork isislicensedlicensed underunder thethe
ApacheApache 2
2licenselicense.. 878787
Umar SaiduAuna
Software Engineer, gidimo
tech community Organizer
umarauna
A PROGRAMMING
LANGUAGE THAT BRINGS JOY
TO PROGRAMMERS
INTRODUCTION TO
KOTLIN
SOFTWARE DEVELOPER
AND TRAINER
ABO
UT
ME
• Android and IOS Developer.
• Lead Mobile Developer for DOUBLET (App For
Couples).
• Project Lead and Lead Mobile
Developer for KITCHLY (App for Food
Lovers).
• Software Trainer at Rework Academy.
CONNECT: linkedin.com/in/young-batimehin-
5a6208159
YOUNG AYODEJI BATIMEHIN
LET’s GET TO
KNOW THE
AUDIENCE
1) Introduction to
Kotlin
2) Features
3) Kotlin Vs Java
4) Set Up Development Environment
5) Build a List App.
6) Conclusion and Questions.
Today’s
Agenda
• Kotlin is a statically typed programming language.
• It supports object-oriented programming and functional programming
features.
• It can also be compiled into Javascript source code.
• Extension of the Kotlin is (.kt)
• It’s a JVM targeted language.
• Kotlin supports procedural programming with the use of functions.
• Supports Multi-platform projects.
• It is an open-source language.
• It is now the official language for Android Development.
INTRODUCTIO
N
KOTLIN
FEATURES
Use Kotlin for any
type of Enterprise
Java EE
Development
100 %
Compactible
with all JVM
frameworks
Null Safety. Kotlin
Avoids the null
pointer exception
when using or
declaring variables.
Kotlin wants you
to write less
code
Familiar to Java.
But you can still
learn Kotlin
without
experience with
java
Automatic
Conversion from
Kotlin to java
Strong
Community
Kotlin integrates well
with all existing Java
Frameworks and
Libaries
LIST APP
• Open Android Studio
• Set-up Android project with Kotlin as code base
• Brief explanation of all dependency and
implementation
• Implement Recycler View
• Implement Cardview
• Use Custom RecyclerView Adapter
• Model Class
• Layout Managers
Set Up Development
Environment
FOR LIST APP

Kotlin what_you_need_to_know-converted event 4 with nigerians

  • 1.
    Kotlin: What you needto know Android Development with Kotlin v1.0 ThisThis workwork isislicensedlicensed underunder thethe ApacheApache 2 2licenselicense.. 1 1 1 Umar SaiduAuna Software Engineer, gidimo tech community Organizer umarauna November 24, 2021
  • 3.
    What mostly happento JAVA programmers before Kotlin
  • 4.
  • 5.
    History Kotlin is across-platform, statically typed, general-purpose programming language and runs on the JVM
  • 6.
    History Kotlin is across-platform, statically typed, general-purpose programming language and runs on the JVM. Kotlin was developed by JetBrains (Makers of IntelliJ)
  • 7.
    History Kotlin is across-platform, statically typed, general-purpose programming language and runs on the JVM. Kotlin was developed by JetBrains (Makers of IntelliJ) First commit dates back to 2010, but was first publicly seen around 2011.
  • 8.
    History - Whydid Google make it official? Awesome features - nullable types, concise, data classes, etc. Great community support There was an overwhelming request for Kotlin official support on Android
  • 9.
  • 10.
    What is Kotlin Kotlinis a cross-platform, statically typed, general-purpose programming language, it is also JVM based language developed by JetBrains as described before, a company known for the creation of IntelliJ IDEA, a powerful IDE for Java development. In Kotlin everything is an Object.
  • 11.
    What is Kotlin Kotlinis a cross-platform, statically typed, general-purpose programming language, it is also JVM based language developed by JetBrains as described before, a company known for the creation of IntelliJ IDEA, a powerful IDE for Java development. In Kotlin everything is an Object. Kotlin is very intuitive and easy to learn for Java developers (give it 10 days trials and you wont regret).
  • 12.
    What is Kotlin Kotlinis a cross-platform, statically typed, general-purpose programming language, it is also JVM based language developed by JetBrains as described before, a company known for the creation of IntelliJ IDEA, a powerful IDE for Java development. In Kotlin everything is an Object. Kotlin is very intuitive and easy to learn for Java developers (give it 10 days trials and you wont regret). Its more expressive & safer
  • 13.
    What is Kotlin Kotlinis a cross-platform, statically typed, general-purpose programming language, it is also JVM based language developed by JetBrains as described before, a company known for the creation of IntelliJ IDEA, a powerful IDE for Java development. In Kotlin everything is an Object. Kotlin is very intuitive and easy to learn for Java developers (give it 10 days trials and you wont regret). Its more expressive & safer Its highly interoperable
  • 14.
  • 15.
    “In Kotlin, everythingis an object (reference type), we don’t find primitives types as the ones we can use in Java……...”
  • 16.
  • 17.
  • 18.
  • 19.
  • 21.
  • 22.
    Kotlin sample code….. funmain(args: Array<String>){ //your code goes here }
  • 23.
    Kotlin 1.3 nomore (args: Array<String>) fun main(){ // your code goes here }
  • 26.
    Null Safety -nullable types and non-nullable types Tony Hoare, one of the creators of the programming language ALGOL. Protects against NullPointerException the $1,000,000,000 mistake
  • 27.
    Null Safety -nullable types and non-nullable types Tony Hoare, one of the creators of the programming language ALGOL. Protects against NullPointerException the $1,000,000,000 mistake A non-nullable object can’t be null // compiler error var name: String name = null
  • 28.
    Null Safety -nullable types and non-nullable types Tony Hoare, one of the creators of the programming language ALGOL. Protects against NullPointerException the $1,000,000,000 mistake A non-nullable object can’t be null // compiler error var name: String name = null Specify a nullable object by using “?” // compiler error var name: String? val length = name.length Kotlin ensures that you don’t mistakenly operate on nullable objects
  • 30.
    Null Safety -Accessing properties in a nullable object 1. Checking for null types // handle non-null case and null case var name: String? = null val length = if (name != null) name.length else 0
  • 31.
    Null Safety -Accessing properties in a nullable object 2. Making safe calls using “?.” //use ?. to make safe call var name: String? ... val length = name?.length Use ?. to safely access a property/method on a nullable object If name happens to be null, the value of length is 0 (inferred integer). length would be null if it were of another type.
  • 32.
    Null Safety -Accessing properties in a nullable object 3. Making use of the “?:” elvis operator //use elvis operator var name: String? val length = name?.length ?: 0 This reads as “if name is not null, use name.length else use 0 Elvis Presley. His hairstyle resembles a Question Mark
  • 33.
    Null Safety -Accessing properties in a nullable object 4. Making use of the “!!” assertion operator //use assertion operator var name: String? = null val length = name!!.length This reads as “if name is not null, use name.length else throw a null pointer exception”
  • 34.
    Null Safety -Accessing properties in a nullable object 4. Making use of the “!!” assertion operator //use elvis operator var name: String? = null val length = name!!.length This reads as “if name is not null, use name.length else throw a null pointer exception” Be very careful with this operator!!!
  • 35.
    Null Safety -NPE free! You can only have the NullPointerException in Kotlin if: 1. You explicitly throw a NPE 2. You make use of the !! operator 3. An external Java code causes the NPE.
  • 36.
    String Interpolation /template in Kotlin fun hello(name: String) { println("Hello, $name") }
  • 37.
    String Interpolation inJava + Kotlin void hello(String name) { System.out.println("Hello, " + name); }
  • 38.
    Immutability Kotlin helps developersto be intentional about immutability. Immutability simply means that things you create can’t be changed. We need immutability because it: ● helps us with thread safety - no synchronization issues ● is good for value objects - objects that simply hold value, POJOs etc. ● helps debugging threaded applications without losing your hair
  • 39.
    Immutability How does itwork in Java? ●Immutability in Java? final classes private fields no setters ● Immutability in Kotlin? Guess?
  • 40.
    Immutability How does Kotlinhelp? var vs val // compiler error: val cannot be reassigned val name = "Umar" name = name.toUpperCase() // works fine var name = "Umar" name = name.toUpperCase()
  • 41.
    Immutability How does Kotlinhelp? Immutable and Mutable collections // immutable collection val unchangeableHobbies = listOf("coding", "hiking") unchangeableHobbies.add() // add method doesn’t exist // mutable collection val changeableHobbies = mutableListOf("reading", "running") changeableHobbies.add("travelling") // you can add
  • 42.
    Immutability In Java vsKotlin public final class ImmutableClassJava { private final String name; private final int age; public ImmutableClassJava(String name, int age) { this.name = name; this.age = age; } // no setters public String getName() { return name; } public int getAge() { return age; } } class ImmutableClassJava(val name: String, val age: Int) ● Class is final by default ●val implies that the parameters are final as well (values can’t be assigned)
  • 43.
    Functions // function sample funsampleFunc() { // code goes here } A function is declared using the “fun” keyword
  • 44.
    Functions // function sample funsampleFunc() { // code goes here } // function with param fun sampleFuncWithParam(param: String) { // code goes here } A function is declared using the “fun” keyword Method parameters use the “name:Type” notation
  • 45.
    Functions // function sample funsampleFunc() { // code goes here } // function with param fun sampleFuncWithParam(param: String) { // code goes here } // func with param and return type fun capitalize(param: String): String { return param.toUpperCase() } A function is declared using the “fun” keyword Method parameters use the “name:Type” notation Return types are specified after the method definition.
  • 46.
    Functions - infixfunctions // infix function infix fun Int.times(x: Int): Int { return this * x } We can use the function as an arithmetic operator, i.e., using it without writing dots and parentheses.
  • 47.
    Functions - infixfunctions // infix function infix fun Int.times(x: Int): Int { return this * x } // usage fun useInfix() { val product = 2 times 5 println(product) } We can use the function as an arithmetic operator, i.e., using it without writing dots and parentheses.
  • 48.
    Functions - extensionfunctions // extension function fun Int.square(): Int { return this * this } Extension function is a member function of a class that is defined outside the class
  • 49.
    Functions - extensionfunctions // extension function fun Int.square(): Int { return this * this } Extension function is a member function of a class that is defined outside the class // usage fun useExtension() { val square = 2.square() println(square) }
  • 50.
    Functions Others: ● Higher orderfunctions ● Lambdas ● Inline functions etc.
  • 52.
  • 53.
  • 54.
  • 55.
    Conciseness in Kotlin publicvoid doSomething() { // do something } fun doSomething(): Unit { // do same thing }
  • 56.
    Conciseness in Kotlin publicvoid doSomething() { // do something } fun doSomething(): Unit { // do same thing }
  • 57.
    Conciseness in Kotlin publicvoid doSomething() { // do something } fun doSomething() { // do same thing }
  • 58.
    Conciseness in Kotlin publicString getName() { return name; } fun getName(): String { return name }
  • 59.
    Conciseness in Kotlin publicString getName() { return name; } fun getName() { return name }
  • 60.
    Conciseness in Kotlin publicString getName() { return name; } fun getName() = name
  • 62.
  • 63.
    Class in Javavs Data Class in Kotlin public class Person { private String name; String getName () { return name; } void setName (String name) { this.name = name; } @Override public String toString () { return "Person{" + "name='" + name + ''' + '}'; } } data class Person(val name: String)
  • 64.
    Class in Javavs Regular Class in Kotlin public class Person { private String name; String getName () { return name; } void setName (String name) { this.name = name; } public int getNameLength () { return name.length } } class Person(name: String) { var name: String get() = name set(name) { this.name = name } fun getNameLength(): Int { return name.length } }
  • 65.
    Class in Javavs Regular Class in Kotlin public class Person { private String name; String getName () { return name; } void setName (String name) { this.name = name; } public int getNameLength () { return name.length } } class Person(name: String) { var name: String get() = name set(name) { this.name = name } fun getNameLength() = name.length }
  • 67.
  • 68.
    Important place tolearn…….
  • 69.
    Important place tolearn……. Tutorials Point - Kotlin
  • 70.
    Important place tolearn……. Tutorials Point - Kotlin Kotlin for Android Developers – Antonio Leiva
  • 71.
    Important place tolearn……. Tutorials Point - Kotlin Kotlin for Android Developers – Antonio Leiva Koans online – try.kotl.in/koans
  • 72.
    Important place tolearn……. Tutorials Point - Kotlin Kotlin for Android Developers – Antonio Leiva Koans online – try.kotl.in/koans Kotlin Bootcamp for Programmers - Udacity
  • 73.
    Important place tolearn……. Tutorials Point - Kotlin Kotlin for Android Developers – Antonio Leiva Koans online – try.kotl.in/koans Kotlin Bootcamp for Programmers - Udacity https://developer.android.com/kotlin/learn
  • 74.
  • 76.
  • 77.
  • 78.
  • 79.
    Summary • Interoperable withJava (100%) • Reduces Boilerplate code • Object-Oriented and procedural • Safety code • No Semicolon • Expands your skillset • Perfect Support with Android Studio & Gradle • Very easy to get started with Android Development
  • 80.
  • 81.
    Reduces Boilerplates codeslike: findViewById, Async, build interfaces with Kotlin code etc
  • 82.
    Kotlin Android Extensionit includes a view binder. The plugin automatically creates a set of properties that give direct access to all the views in the XML.
  • 83.
  • 84.
    Finally You have 3Options.. 1 Decide Kotlin is not For you and continue with Java
  • 85.
    Finally 1 Decide Kotlin isnot For you and continue with Java You have 3 Options.. 2 Try to learn everything on your own
  • 86.
    Finally 1 Decide Kotlin isnot For you and continue with Java You have 3 Options.. 3 Go and learn on MOOC websites 2 Try to learn everything on your own
  • 87.
    Questions ? Thank you! Android Developmentwith Kotlin v1.0 ThisThis workwork isislicensedlicensed underunder thethe ApacheApache 2 2licenselicense.. 878787 Umar SaiduAuna Software Engineer, gidimo tech community Organizer umarauna
  • 88.
    A PROGRAMMING LANGUAGE THATBRINGS JOY TO PROGRAMMERS INTRODUCTION TO KOTLIN
  • 89.
    SOFTWARE DEVELOPER AND TRAINER ABO UT ME •Android and IOS Developer. • Lead Mobile Developer for DOUBLET (App For Couples). • Project Lead and Lead Mobile Developer for KITCHLY (App for Food Lovers). • Software Trainer at Rework Academy. CONNECT: linkedin.com/in/young-batimehin- 5a6208159 YOUNG AYODEJI BATIMEHIN
  • 90.
    LET’s GET TO KNOWTHE AUDIENCE
  • 91.
    1) Introduction to Kotlin 2)Features 3) Kotlin Vs Java 4) Set Up Development Environment 5) Build a List App. 6) Conclusion and Questions. Today’s Agenda
  • 92.
    • Kotlin isa statically typed programming language. • It supports object-oriented programming and functional programming features. • It can also be compiled into Javascript source code. • Extension of the Kotlin is (.kt) • It’s a JVM targeted language. • Kotlin supports procedural programming with the use of functions. • Supports Multi-platform projects. • It is an open-source language. • It is now the official language for Android Development. INTRODUCTIO N KOTLIN
  • 93.
    FEATURES Use Kotlin forany type of Enterprise Java EE Development 100 % Compactible with all JVM frameworks Null Safety. Kotlin Avoids the null pointer exception when using or declaring variables. Kotlin wants you to write less code Familiar to Java. But you can still learn Kotlin without experience with java Automatic Conversion from Kotlin to java Strong Community Kotlin integrates well with all existing Java Frameworks and Libaries
  • 94.
  • 95.
    • Open AndroidStudio • Set-up Android project with Kotlin as code base • Brief explanation of all dependency and implementation • Implement Recycler View • Implement Cardview • Use Custom RecyclerView Adapter • Model Class • Layout Managers Set Up Development Environment FOR LIST APP