SlideShare a Scribd company logo
Say Goodbye to Java: Getting
Started With Kotlin for
Android
Adam Magaña
Introduction
Introduction
● Adam Magaña
● Lead Mobile Engineer @ Drund
● Currently spending most of my development time working on our Android
application.
A Quick History of Kotlin
A Quick History of Kotlin
● Created by JetBrains
○ Creator of IntelliJ, the IDE that powers Android Studio
● First release - July 2011
● Latest release (1.1.3) - June 2017
● Official endorsement by Google as first-class language - May 2017
● 8,000+ total releases on GitHub
“We believe Kotlin is an excellent fit for
Android not only because it gives
developers what they want, but also
because it matches the spirit of
Android.”
- Google Developer Product Group
Companies Using Kotlin
Companies Using Kotlin
● Pinterest
● Netflix
● AWS
● Uber
● Square
● Trello
10%
Reduction in total methods after converting Basecamp to Kotlin.
30%
Reduction in total lines of code after converting Basecamp to Kotlin.
Addressing Common Concerns
“But I’m comfortable and experienced
with Java.”
● That’s great!
● You ultimately have to use what you’re most comfortable with.
● BUT “give it 5 minutes” before reacting.
“I don’t want to convert my entire
codebase to a new language.”
● Kotlin can be any percentage of your project.
● Fully compatible with JDK 6.
● 100% interoperable with existing Java code.
“I don’t need Kotlin’s special tools to get
the job done.”
● An experienced developer absolutely doesn’t need Kotlin.
● Much can be accomplished with Java.
● BUT barring architectural/performance issues, why would you want
to have less tools available to you?
“I’m worried about the performance
implications of using Kotlin.”
● Performance is as good as an equivalent Java application.
● Kotlin lambdas often run faster than the same code written in Java.
● Incremental project builds using Kotlin are usually faster.
A Very Small Soapbox
A Very Small Soapbox
● Don’t let anyone, myself included, make you feel inadequate for choosing a
different programming language or platform than them.
● Will there be better alternatives to what you use? Yes.
● Does that mean the service you provide to your users is sub-par? No.
● Is it okay to have differing opinions about certain technologies? Absolutely.
● Important to be supportive.
We’re all in this together.
Setting Up Kotlin in Android
Studio
Setting Up Kotlin in Android Studio
● Extremely easy setup for both major versions of AS
● Plugin for AS 2.3.X
○ Preferences > Plugins > Install JetBrains Plugin
● Baked-in support in AS 3.0.0 (beta)
○ Also includes:
■ A new profiler tool
■ A network/request analyzer (!)
Installing the plugin for AS 2.3.X
Kotlin: The Basics
Kotlin: The Basics - Variable Declarations
Kotlin: The Basics - Function Declarations
Kotlin: The Basics - Class Declarations
Kotlin: The Cool Parts
Kotlin: The Cool Parts - Data Classes (http://bit.ly/2xhvVlh)
Kotlin: The Cool Parts - Elvis Operator
Kotlin: The Cool Parts - Extension Functions
Kotlin: The Cool Parts - Named and Default Arguments
Kotlin: The Cool Parts - When
Kotlin: The Cool Parts - Operator Overloading
Kotlin: The Cool Parts - Object Desctructuring
Kotlin: The Cool Parts - Custom Infix Operators
Kotlin: The Cool Parts - And Much More!
● Lambda functions
● Easier string interpolation
● Simplified getter/setter syntax
● Coroutines
● “Synthetic” plugin to replace findViewById (similar to Butterknife)
Converting Java to Kotlin
Converting Java to Kotlin - Using the Converter
Converting Java to Kotlin - Double Bangs
Converting Java to Kotlin - Companion Objects
Drawbacks To Kotlin
Drawbacks To Kotlin
● It’s new
○ Initial development with Kotlin will be slower
○ Code patterns/anti-patterns not fully flushed out yet
● Java has more robust static analysis tools
● Much smaller developer community than Java’s
● Adds ~727kB to the total size of your project
Over time the benefits
of using Kotlin will
continue to grow.
Give it a try!
Thank you!
Twitter: @adammagana
GitHub: @adammagana

More Related Content

What's hot

Kotlin - Better Java
Kotlin - Better JavaKotlin - Better Java
Kotlin - Better Java
Dariusz Lorenc
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
Hassan Abid
 
The Kotlin Programming Language
The Kotlin Programming LanguageThe Kotlin Programming Language
The Kotlin Programming Languageintelliyole
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin
XPeppers
 
Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I
Atif AbbAsi
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?
intelliyole
 
Kotlin: Challenges in JVM language design
Kotlin: Challenges in JVM language designKotlin: Challenges in JVM language design
Kotlin: Challenges in JVM language design
Andrey Breslav
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivity
nklmish
 
Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Andrey Breslav
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
Haim Yadid
 
Kotlin a problem solver - gdd extended pune
Kotlin   a problem solver - gdd extended puneKotlin   a problem solver - gdd extended pune
Kotlin a problem solver - gdd extended pune
Hardik Trivedi
 
Fall in love with Kotlin
Fall in love with KotlinFall in love with Kotlin
Fall in love with Kotlin
Hari Vignesh Jayapalan
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin PresentationAndrzej Sitek
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
Ciro Rizzo
 
Kotlin cheat sheet by ekito
Kotlin cheat sheet by ekitoKotlin cheat sheet by ekito
Kotlin cheat sheet by ekito
Arnaud Giuliani
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
Arnaud Giuliani
 
Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017
Arnaud Giuliani
 
Kotlin
KotlinKotlin
Kotlin
Rory Preddy
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
Codemotion
 
Kotlin intro
Kotlin introKotlin intro
Kotlin intro
Elifarley Cruz
 

What's hot (20)

Kotlin - Better Java
Kotlin - Better JavaKotlin - Better Java
Kotlin - Better Java
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
 
The Kotlin Programming Language
The Kotlin Programming LanguageThe Kotlin Programming Language
The Kotlin Programming Language
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin
 
Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?
 
Kotlin: Challenges in JVM language design
Kotlin: Challenges in JVM language designKotlin: Challenges in JVM language design
Kotlin: Challenges in JVM language design
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivity
 
Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
 
Kotlin a problem solver - gdd extended pune
Kotlin   a problem solver - gdd extended puneKotlin   a problem solver - gdd extended pune
Kotlin a problem solver - gdd extended pune
 
Fall in love with Kotlin
Fall in love with KotlinFall in love with Kotlin
Fall in love with Kotlin
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin Presentation
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
 
Kotlin cheat sheet by ekito
Kotlin cheat sheet by ekitoKotlin cheat sheet by ekito
Kotlin cheat sheet by ekito
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 
Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017
 
Kotlin
KotlinKotlin
Kotlin
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
Kotlin intro
Kotlin introKotlin intro
Kotlin intro
 

Similar to Say Goodbye To Java: Getting Started With Kotlin For Android Development

Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for Android
Han Yin
 
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfLearn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Bcoder Dev
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
T.M. Ishrak Hussain
 
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
9 series
 
Kotlin – Alternative oder Ergänzung zu Java?
Kotlin – Alternative oder Ergänzung zu Java?Kotlin – Alternative oder Ergänzung zu Java?
Kotlin – Alternative oder Ergänzung zu Java?
gedoplan
 
Introduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTXIntroduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTX
Syed Awais Mazhar Bukhari
 
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
mCloud
 
Dev Catchup @ARQGroup
Dev Catchup @ARQGroupDev Catchup @ARQGroup
Dev Catchup @ARQGroup
Karan Sharma
 
Kotlin
KotlinKotlin
Kotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right LanguageKotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right Language
FredReynolds2
 
Android Development with Kotlin course
Android Development  with Kotlin courseAndroid Development  with Kotlin course
Android Development with Kotlin course
GoogleDevelopersLeba
 
Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
Abdul Rahman Masri Attal
 
Kotlin App Development Tips.pdf
Kotlin App Development Tips.pdfKotlin App Development Tips.pdf
Kotlin App Development Tips.pdf
Marie Weaver
 
Desarrollo multiplataforma con kotlin | UPV 2018
Desarrollo multiplataforma con kotlin  | UPV 2018Desarrollo multiplataforma con kotlin  | UPV 2018
Desarrollo multiplataforma con kotlin | UPV 2018
Víctor Bolinches
 
Why You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdfWhy You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdf
RipenApps
 
What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.
SimileoluwaAluko
 
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
Elsner Technologies Pvt. Ltd.
 
Kotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdfKotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdf
Techugo
 
Kotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHERKotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHER
Nitish Garg
 
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)
Questpond
 

Similar to Say Goodbye To Java: Getting Started With Kotlin For Android Development (20)

Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for Android
 
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfLearn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
 
Kotlin – Alternative oder Ergänzung zu Java?
Kotlin – Alternative oder Ergänzung zu Java?Kotlin – Alternative oder Ergänzung zu Java?
Kotlin – Alternative oder Ergänzung zu Java?
 
Introduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTXIntroduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTX
 
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
 
Dev Catchup @ARQGroup
Dev Catchup @ARQGroupDev Catchup @ARQGroup
Dev Catchup @ARQGroup
 
Kotlin
KotlinKotlin
Kotlin
 
Kotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right LanguageKotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right Language
 
Android Development with Kotlin course
Android Development  with Kotlin courseAndroid Development  with Kotlin course
Android Development with Kotlin course
 
Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
 
Kotlin App Development Tips.pdf
Kotlin App Development Tips.pdfKotlin App Development Tips.pdf
Kotlin App Development Tips.pdf
 
Desarrollo multiplataforma con kotlin | UPV 2018
Desarrollo multiplataforma con kotlin  | UPV 2018Desarrollo multiplataforma con kotlin  | UPV 2018
Desarrollo multiplataforma con kotlin | UPV 2018
 
Why You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdfWhy You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdf
 
What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.
 
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
 
Kotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdfKotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdf
 
Kotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHERKotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHER
 
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)
 

Recently uploaded

Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 

Say Goodbye To Java: Getting Started With Kotlin For Android Development

  • 1. Say Goodbye to Java: Getting Started With Kotlin for Android Adam Magaña
  • 3. Introduction ● Adam Magaña ● Lead Mobile Engineer @ Drund ● Currently spending most of my development time working on our Android application.
  • 4. A Quick History of Kotlin
  • 5. A Quick History of Kotlin ● Created by JetBrains ○ Creator of IntelliJ, the IDE that powers Android Studio ● First release - July 2011 ● Latest release (1.1.3) - June 2017 ● Official endorsement by Google as first-class language - May 2017 ● 8,000+ total releases on GitHub
  • 6. “We believe Kotlin is an excellent fit for Android not only because it gives developers what they want, but also because it matches the spirit of Android.” - Google Developer Product Group
  • 8. Companies Using Kotlin ● Pinterest ● Netflix ● AWS ● Uber ● Square ● Trello
  • 9. 10% Reduction in total methods after converting Basecamp to Kotlin.
  • 10. 30% Reduction in total lines of code after converting Basecamp to Kotlin.
  • 12. “But I’m comfortable and experienced with Java.” ● That’s great! ● You ultimately have to use what you’re most comfortable with. ● BUT “give it 5 minutes” before reacting.
  • 13. “I don’t want to convert my entire codebase to a new language.” ● Kotlin can be any percentage of your project. ● Fully compatible with JDK 6. ● 100% interoperable with existing Java code.
  • 14. “I don’t need Kotlin’s special tools to get the job done.” ● An experienced developer absolutely doesn’t need Kotlin. ● Much can be accomplished with Java. ● BUT barring architectural/performance issues, why would you want to have less tools available to you?
  • 15. “I’m worried about the performance implications of using Kotlin.” ● Performance is as good as an equivalent Java application. ● Kotlin lambdas often run faster than the same code written in Java. ● Incremental project builds using Kotlin are usually faster.
  • 16. A Very Small Soapbox
  • 17. A Very Small Soapbox ● Don’t let anyone, myself included, make you feel inadequate for choosing a different programming language or platform than them. ● Will there be better alternatives to what you use? Yes. ● Does that mean the service you provide to your users is sub-par? No. ● Is it okay to have differing opinions about certain technologies? Absolutely. ● Important to be supportive.
  • 18. We’re all in this together.
  • 19. Setting Up Kotlin in Android Studio
  • 20. Setting Up Kotlin in Android Studio ● Extremely easy setup for both major versions of AS ● Plugin for AS 2.3.X ○ Preferences > Plugins > Install JetBrains Plugin ● Baked-in support in AS 3.0.0 (beta) ○ Also includes: ■ A new profiler tool ■ A network/request analyzer (!)
  • 21. Installing the plugin for AS 2.3.X
  • 23. Kotlin: The Basics - Variable Declarations
  • 24. Kotlin: The Basics - Function Declarations
  • 25. Kotlin: The Basics - Class Declarations
  • 27. Kotlin: The Cool Parts - Data Classes (http://bit.ly/2xhvVlh)
  • 28. Kotlin: The Cool Parts - Elvis Operator
  • 29. Kotlin: The Cool Parts - Extension Functions
  • 30. Kotlin: The Cool Parts - Named and Default Arguments
  • 31. Kotlin: The Cool Parts - When
  • 32. Kotlin: The Cool Parts - Operator Overloading
  • 33. Kotlin: The Cool Parts - Object Desctructuring
  • 34. Kotlin: The Cool Parts - Custom Infix Operators
  • 35. Kotlin: The Cool Parts - And Much More! ● Lambda functions ● Easier string interpolation ● Simplified getter/setter syntax ● Coroutines ● “Synthetic” plugin to replace findViewById (similar to Butterknife)
  • 37. Converting Java to Kotlin - Using the Converter
  • 38. Converting Java to Kotlin - Double Bangs
  • 39. Converting Java to Kotlin - Companion Objects
  • 41. Drawbacks To Kotlin ● It’s new ○ Initial development with Kotlin will be slower ○ Code patterns/anti-patterns not fully flushed out yet ● Java has more robust static analysis tools ● Much smaller developer community than Java’s ● Adds ~727kB to the total size of your project
  • 42. Over time the benefits of using Kotlin will continue to grow.
  • 43. Give it a try!

Editor's Notes

  1. Highly recommend the pinterest engineering blog for insights on how they use Kotlin
  2. Dan Kim, Basecamp, developer happiness Overheard Nick talk about Ruby Dan compares Kotlin it to the way people feel about Ruby
  3. Made for classes are strictly used as data containers.