SlideShare a Scribd company logo
1 of 20
Kotlin for Android
Prepared by Shady Selim
For GDG 6 October Google I/O 17 Event
On 8/7/2017
Speaker Bio
• Official Google Speaker
• GDG Helwan Founder & Leader
• Mobile & Web Evangelist
• Technology savvy
• Think tank, Father
• UI/UX freak
• Leader & Mentor
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
• 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
public class Customer {
private String name;
private String email;
private String company;
public Customer(String name) {
this(name, "", "");
}
public Customer(String name, String email) {
this(name, email, "");
}
public Customer(String name, String email, String company) {
this.name = name;
this.email = email;
this.company = company;
}
Java Model Example, cont.
11
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
Java Model Example, cont.
12
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Customer customer = (Customer) o;
if (name != null ? !name.equals(customer.name) : customer.name != null) return false;
if (email != null ? !email.equals(customer.email) : customer.email != null) return false;
return company != null ? company.equals(customer.company) : customer.company == null;
}
Java Model Example, cont.
13
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (email != null ? email.hashCode() : 0);
result = 31 * result + (company != null ? company.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Customer{" +
"name='" + name + ''' +
", email='" + email + ''' +
", company='" + company + ''' +
'}';
}
}
Kotlin Model Example, cont.
14
data class Customer(var name: String,
var email: String = "",
var company: String = "")
Do you like reactive programming?
15
You will not miss your frameworks or libraries
16
You will not miss your frameworks or libraries
17
kotlin.link
18
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/
19
Questions!?
20

More Related Content

What's hot

Kotlin & arrow: the functional way
Kotlin & arrow:  the functional wayKotlin & arrow:  the functional way
Kotlin & arrow: the functional waynluaces
 
Kotlin & Arrow the functional way
Kotlin & Arrow the functional wayKotlin & Arrow the functional way
Kotlin & Arrow the functional wayThoughtworks
 
Kotlin - A Programming Language
Kotlin - A Programming Language Kotlin - A Programming Language
Kotlin - A Programming Language Mobio Solutions
 
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所Kenichi Kambara
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to GoOliver N
 
Log cat kotlindsl
Log cat kotlindslLog cat kotlindsl
Log cat kotlindslsanaebadi1
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutinesRoman Elizarov
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki MizunoNexus FrontierTech
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
A Brief Overview of Kotlin
A Brief Overview of KotlinA Brief Overview of Kotlin
A Brief Overview of KotlinSevil Güler
 
Internal domain-specific languages
Internal domain-specific languagesInternal domain-specific languages
Internal domain-specific languagesMikhail Barash
 
How to contribute textual tooling for apache camel in several id es
How to contribute textual tooling for apache camel in several id esHow to contribute textual tooling for apache camel in several id es
How to contribute textual tooling for apache camel in several id esAurélien Pupier
 
Agile Tools for PHP
Agile Tools for PHPAgile Tools for PHP
Agile Tools for PHPphilipjting
 
Implementing DSLs in practice
Implementing DSLs in practiceImplementing DSLs in practice
Implementing DSLs in practiceMikhail Barash
 
Coffee scripts with rails
Coffee scripts with railsCoffee scripts with rails
Coffee scripts with railsDevilal Dheer
 

What's hot (20)

Kotlin L → ∞
Kotlin L → ∞Kotlin L → ∞
Kotlin L → ∞
 
Slides kotlin yajug
Slides kotlin yajugSlides kotlin yajug
Slides kotlin yajug
 
Kotlin & arrow: the functional way
Kotlin & arrow:  the functional wayKotlin & arrow:  the functional way
Kotlin & arrow: the functional way
 
Kotlin introduction
Kotlin introductionKotlin introduction
Kotlin introduction
 
Kotlin & Arrow the functional way
Kotlin & Arrow the functional wayKotlin & Arrow the functional way
Kotlin & Arrow the functional way
 
Coding in kotlin
Coding in kotlinCoding in kotlin
Coding in kotlin
 
Kotlin - A Programming Language
Kotlin - A Programming Language Kotlin - A Programming Language
Kotlin - A Programming Language
 
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所
[Kotlin勉強会] Hello Kotlinの次におさえたいKotlinの勘所
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to Go
 
Log cat kotlindsl
Log cat kotlindslLog cat kotlindsl
Log cat kotlindsl
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutines
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Hello to Kotlin
Hello to KotlinHello to Kotlin
Hello to Kotlin
 
A Brief Overview of Kotlin
A Brief Overview of KotlinA Brief Overview of Kotlin
A Brief Overview of Kotlin
 
Internal domain-specific languages
Internal domain-specific languagesInternal domain-specific languages
Internal domain-specific languages
 
How to contribute textual tooling for apache camel in several id es
How to contribute textual tooling for apache camel in several id esHow to contribute textual tooling for apache camel in several id es
How to contribute textual tooling for apache camel in several id es
 
Agile Tools for PHP
Agile Tools for PHPAgile Tools for PHP
Agile Tools for PHP
 
Implementing DSLs in practice
Implementing DSLs in practiceImplementing DSLs in practice
Implementing DSLs in practice
 
Coffee scripts with rails
Coffee scripts with railsCoffee scripts with rails
Coffee scripts with rails
 

Similar to Kotlin for android

Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)
Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)
Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)Ahmed Nabil
 
Kotlin for android
Kotlin for androidKotlin for android
Kotlin for androidAhmed Nabil
 
Having Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaHaving Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaDILo Surabaya
 
Be More Productive with Kotlin
Be More Productive with KotlinBe More Productive with Kotlin
Be More Productive with KotlinBrandon Wever
 
Dear Kotliners - Java Developers are Humans too
Dear Kotliners - Java Developers are Humans tooDear Kotliners - Java Developers are Humans too
Dear Kotliners - Java Developers are Humans tooVivek Chanddru
 
Kotlin Native - C / Swift Interop - ACCU Autmn 2019
Kotlin Native - C / Swift Interop - ACCU Autmn 2019Kotlin Native - C / Swift Interop - ACCU Autmn 2019
Kotlin Native - C / Swift Interop - ACCU Autmn 2019Eamonn Boyle
 
Kotlin for all the Things
Kotlin for all the ThingsKotlin for all the Things
Kotlin for all the ThingsEamonn Boyle
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
OSML and OpenSocial 0.9
OSML and OpenSocial 0.9OSML and OpenSocial 0.9
OSML and OpenSocial 0.9MySpaceDevTeam
 
So S.O.L.I.D Fu - Designing Better Code
So S.O.L.I.D Fu - Designing Better CodeSo S.O.L.I.D Fu - Designing Better Code
So S.O.L.I.D Fu - Designing Better CodeNeil Crookes
 
ES6 Simplified
ES6 SimplifiedES6 Simplified
ES6 SimplifiedCarlos Ble
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Google io extended '17 인천
Google io extended '17 인천Google io extended '17 인천
Google io extended '17 인천Pluu love
 
SOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principlesSOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principlesSergey Karpushin
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksGerald Krishnan
 

Similar to Kotlin for android (20)

Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)
Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)
Kotlin mufix 31 10-2019 by Ahmed Nabil(AhmedNMahran)
 
Kotlin for android
Kotlin for androidKotlin for android
Kotlin for android
 
SOLID
SOLIDSOLID
SOLID
 
Unleashing kotlin's power
Unleashing kotlin's powerUnleashing kotlin's power
Unleashing kotlin's power
 
Having Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaHaving Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo Surabaya
 
Be More Productive with Kotlin
Be More Productive with KotlinBe More Productive with Kotlin
Be More Productive with Kotlin
 
Dear Kotliners - Java Developers are Humans too
Dear Kotliners - Java Developers are Humans tooDear Kotliners - Java Developers are Humans too
Dear Kotliners - Java Developers are Humans too
 
Kotlin Native - C / Swift Interop - ACCU Autmn 2019
Kotlin Native - C / Swift Interop - ACCU Autmn 2019Kotlin Native - C / Swift Interop - ACCU Autmn 2019
Kotlin Native - C / Swift Interop - ACCU Autmn 2019
 
From Java to Python
From Java to PythonFrom Java to Python
From Java to Python
 
Kotlin for all the Things
Kotlin for all the ThingsKotlin for all the Things
Kotlin for all the Things
 
Javascript Best Practices
Javascript Best PracticesJavascript Best Practices
Javascript Best Practices
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
Kotlin
KotlinKotlin
Kotlin
 
OSML and OpenSocial 0.9
OSML and OpenSocial 0.9OSML and OpenSocial 0.9
OSML and OpenSocial 0.9
 
So S.O.L.I.D Fu - Designing Better Code
So S.O.L.I.D Fu - Designing Better CodeSo S.O.L.I.D Fu - Designing Better Code
So S.O.L.I.D Fu - Designing Better Code
 
ES6 Simplified
ES6 SimplifiedES6 Simplified
ES6 Simplified
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Google io extended '17 인천
Google io extended '17 인천Google io extended '17 인천
Google io extended '17 인천
 
SOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principlesSOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principles
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC Frameworks
 

More from Shady Selim

What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How? What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How? Shady Selim
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and AndroidShady Selim
 
Introduction on Mobile development
Introduction on Mobile developmentIntroduction on Mobile development
Introduction on Mobile developmentShady Selim
 
Game development using Flutter
Game development using FlutterGame development using Flutter
Game development using FlutterShady Selim
 
I/O 2019 android updates
I/O 2019 android updatesI/O 2019 android updates
I/O 2019 android updatesShady Selim
 
Kotlin for android 2019
Kotlin for android 2019Kotlin for android 2019
Kotlin for android 2019Shady Selim
 
What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)Shady Selim
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to FlutterShady Selim
 
Intro to kotlin 2018
Intro to kotlin 2018Intro to kotlin 2018
Intro to kotlin 2018Shady Selim
 
The magic of flutter
The magic of flutterThe magic of flutter
The magic of flutterShady Selim
 
Kotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web developmentKotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web developmentShady Selim
 
Android content provider explained
Android content provider explainedAndroid content provider explained
Android content provider explainedShady Selim
 
Design for Web and Mobile
Design for Web and MobileDesign for Web and Mobile
Design for Web and MobileShady Selim
 
Towards a better higher education system by Shady Selim
Towards a better higher education system by Shady SelimTowards a better higher education system by Shady Selim
Towards a better higher education system by Shady SelimShady Selim
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material LabsShady Selim
 
Android Programing Course Material
Android Programing Course Material Android Programing Course Material
Android Programing Course Material Shady Selim
 
Mobile apps types + Responsice Vs. Adaptive
Mobile apps types + Responsice Vs. AdaptiveMobile apps types + Responsice Vs. Adaptive
Mobile apps types + Responsice Vs. AdaptiveShady Selim
 
Grow your business with player analytics ben frenkel & Shady Selim
Grow your business with player analytics   ben frenkel & Shady SelimGrow your business with player analytics   ben frenkel & Shady Selim
Grow your business with player analytics ben frenkel & Shady SelimShady Selim
 

More from Shady Selim (20)

What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How? What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How?
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and Android
 
Introduction on Mobile development
Introduction on Mobile developmentIntroduction on Mobile development
Introduction on Mobile development
 
Game development using Flutter
Game development using FlutterGame development using Flutter
Game development using Flutter
 
I/O 2019 android updates
I/O 2019 android updatesI/O 2019 android updates
I/O 2019 android updates
 
Kotlin for android 2019
Kotlin for android 2019Kotlin for android 2019
Kotlin for android 2019
 
What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to Flutter
 
Intro to kotlin 2018
Intro to kotlin 2018Intro to kotlin 2018
Intro to kotlin 2018
 
The magic of flutter
The magic of flutterThe magic of flutter
The magic of flutter
 
Kotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web developmentKotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web development
 
Firebase
FirebaseFirebase
Firebase
 
Android content provider explained
Android content provider explainedAndroid content provider explained
Android content provider explained
 
Design for Web and Mobile
Design for Web and MobileDesign for Web and Mobile
Design for Web and Mobile
 
Towards a better higher education system by Shady Selim
Towards a better higher education system by Shady SelimTowards a better higher education system by Shady Selim
Towards a better higher education system by Shady Selim
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material Labs
 
Android Programing Course Material
Android Programing Course Material Android Programing Course Material
Android Programing Course Material
 
Cross mobility
Cross mobilityCross mobility
Cross mobility
 
Mobile apps types + Responsice Vs. Adaptive
Mobile apps types + Responsice Vs. AdaptiveMobile apps types + Responsice Vs. Adaptive
Mobile apps types + Responsice Vs. Adaptive
 
Grow your business with player analytics ben frenkel & Shady Selim
Grow your business with player analytics   ben frenkel & Shady SelimGrow your business with player analytics   ben frenkel & Shady Selim
Grow your business with player analytics ben frenkel & Shady Selim
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Kotlin for android

  • 1. Kotlin for Android Prepared by Shady Selim For GDG 6 October Google I/O 17 Event On 8/7/2017
  • 2. Speaker Bio • Official Google Speaker • GDG Helwan Founder & Leader • Mobile & Web Evangelist • Technology savvy • Think tank, Father • UI/UX freak • Leader & Mentor www.linkedin.com/in/shadyselim/ @dr_Shady_Selim 2
  • 3. Who created Kotlin? • IntelliJ IDEA • PhpStorm • ReSharper • PyCharm • RubyMine • … others 3
  • 6. 6
  • 8. 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
  • 9. 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 • 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
  • 10. Java Model Example 10 public class Customer { private String name; private String email; private String company; public Customer(String name) { this(name, "", ""); } public Customer(String name, String email) { this(name, email, ""); } public Customer(String name, String email, String company) { this.name = name; this.email = email; this.company = company; }
  • 11. Java Model Example, cont. 11 public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; }
  • 12. Java Model Example, cont. 12 public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Customer customer = (Customer) o; if (name != null ? !name.equals(customer.name) : customer.name != null) return false; if (email != null ? !email.equals(customer.email) : customer.email != null) return false; return company != null ? company.equals(customer.company) : customer.company == null; }
  • 13. Java Model Example, cont. 13 @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (company != null ? company.hashCode() : 0); return result; } @Override public String toString() { return "Customer{" + "name='" + name + ''' + ", email='" + email + ''' + ", company='" + company + ''' + '}'; } }
  • 14. Kotlin Model Example, cont. 14 data class Customer(var name: String, var email: String = "", var company: String = "")
  • 15. Do you like reactive programming? 15
  • 16. You will not miss your frameworks or libraries 16
  • 17. You will not miss your frameworks or libraries 17
  • 19. 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/ 19