SlideShare a Scribd company logo
1 of 67
Download to read offline
Kotlin in the CommunityTeam
Productivity Tools
Languages
Kotlin
MPS
TeamCity
YouTrack
Upsource
IDEs
IntelliJ IDEA
PhpStorm
PyCharm
RubyMine
WebStorm
AppCode
CLion
.NET & Visual Studio
developer productivity tools
ReSharper
ReSharper С++
dotCover
dotTrace
dotMemory
dotPeek
Kotlin: 

Why Do You Care?
Dmitry Jemerov <yole@jetbrains.com>
2
3
• Statically typed programming language targeting
the JVM
• Support for functional and OO paradigms
• Pragmatic, safe, concise, great Java interop
• Free and open-source
• In public beta, 1.0 coming Real Soon Now
4
Outline
• Why Kotlin was created
• Kotlin feature highlights
• How and why we’re using Kotlin
• Where Kotlin works best
• How you can benefit from Kotlin in your projects
5
Why was Kotlin
created?
6
“We’ve built tools to support
so many nice languages,
and we’re still using Java”
7
JetBrains, 2010
Developer Productivity
8
Develop with Pleasure
9
Thought Leadership
• Programming languages are a popular discussion
topic
• IntelliJ IDEA is always going to have best support
for Kotlin
10
Good chance of success
• Technical: experience building intelligent tools to
support other languages
• Marketing: company reputation and user trust
11
Kotlin Feature
Highlights
12
Primary Constructor
class Person(val firstName: String,

val lastName: String) {



}

Properties
class Person(val firstName: String,

val lastName: String) {



val fullName: String

get() = "$firstName $lastName"

}

Properties
class Person(val firstName: String,

val lastName: String) {



val fullName: String

get() = "$firstName $lastName"

}

Smart Casts
interface Expr



class Constant(val value: Double) : Expr



class Sum(val op1: Expr, val op2: Expr)

: Expr

Smart Casts
fun eval(e: Expr): Double = when(e) {

}
Smart Casts
fun eval(e: Expr): Double = when(e) {

}
Smart Casts
fun eval(e: Expr): Double = when(e) {

is Constant -> e.value

}
Smart Casts
fun eval(e: Expr): Double = when(e) {

is Constant -> e.value

}
class Constant(val value: Double) : Expr
Smart Casts
fun eval(e: Expr): Double = when(e) {

is Constant -> e.value

is Sum -> eval(e.op1) + eval(e.op2)

else ->
throw IllegalArgumentException()

}
class Sum(val op1: Expr, val op2: Expr)

: Expr
Extension Functions
fun String.lastChar() = 

this.get(this.length - 1)


"abc".lastChar()
Extension Functions
fun String.lastChar() = 

this.get(this.length - 1)


"abc".lastChar()
Extension Functions
fun String.lastChar() = 

this.get(this.length - 1)


"abc".lastChar()
Nullability
Nullability
class TreeNode(val parent: TreeNode?,

val left: TreeNode?,

val right: TreeNode?) {



}
Nullability
class TreeNode(val parent: TreeNode?,

val left: TreeNode?,

val right: TreeNode?) {



fun depth(): Int {

val parentDepth = if (parent != null) 

parent.depth()

else

0

return parentDepth + 1

}

}
Nullability
class TreeNode(val parent: TreeNode?,

val left: TreeNode?,

val right: TreeNode?) {



fun depth(): Int {

return (parent?.depth() ?: 0) + 1

}

}

Nullability
class TreeNode(val parent: TreeNode?,

val left: TreeNode?,

val right: TreeNode?) {



fun depth(): Int {

return (parent?.depth() ?: 0) + 1

}

}

Collections and Lambdas
fun nobleNames(persons: List<Person>)

= persons

.filter { "von " in it.lastName }

Collections and Lambdas
fun nobleNames(persons: List<Person>)

= persons

.filter { "von " in it.lastName }

Collections and Lambdas
fun nobleNames(persons: List<Person>)

= persons

.filter { "von " in it.lastName }

.sortBy { it.firstName }

Collections and Lambdas
fun nobleNames(persons: List<Person>)

= persons

.filter { "von " in it.lastName }

.sortBy { it.firstName }

.map { "${it.firstName} ${it.lastName}” }
How JetBrains Uses
Kotlin
34
Projects Using Kotlin
• Kotlin
• JetProfile (CRM, sales and license management)
• IntelliJ IDEA 15
• YouTrack v.next
• 2 new unannounced projects
• Research projects related to bioinformatics
• Plugins, Intranet services etc.
35
JetProfile
36
Проект JetProfile
37
JetProfile Project
• Started in July 2013
• Replaces old Spring-based system
• 100% Kotlin, 100k LOC
• Team of 6 developers
38
IntelliJ IDEA
39
Kotlin in IntelliJ IDEA
• In tests since version 14, in production since 15
• 74k LOC in Kotlin, out of which 18k in tests
• A few developers actively using Kotlin
• Kotlin team provides support with updating to new
Kotlin versions
40
Where Kotlin Works
Best
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
Kotlin on the Server Side
• 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
Server-side Kotlin
Frameworks
• Kara: Web framework powering JetProfile

https://github.com/shafirov/kara
• Exposed: Database access framework

https://github.com/JetBrains/exposed
• Ktor: Experimental next generation Web framework

https://github.com/kotlin/ktor
Kara: HTML Builders
fun HtmlBodyTag.renderPersonList(
persons: Collection<Person>)
{

table {

for (person in persons) {

tr {

td { +person.name }

td { +person.age }

}

}

}

}
45
Kara: HTML Builders
fun HtmlBodyTag.renderPersonList(
persons: Collection<Person>)
{

table {

for (person in persons) {

tr {

td { +person.name }

td { +person.age }

}

}

}

}
46
Exposed: Table structure
object CountryTable : IdTable() {

val name = varchar("name", 250)
.uniqueIndex()
val iso = varchar("iso", 3)
.uniqueIndex()


val currency = varchar("currency", 3)

}
47
Exposed: Entities
class Country(id: EntityID) : Entity(id) {

var name: String by CountryTable.name

val allCustomers by Customer.referrersOn(
CustomerTable.country_id)

}
48
Exposed: Queries
val germany = Country
.find { CountryTable.iso eq "de" }
.first()
49
Kotlin for Android
• Compatible with Java 6
• Small runtime library
• Great tooling in Android Studio
• Compatible with existing Java libraries and tools
• 100% Java performance
Kotlin Tools for Android
• Kotlin Android Extensions: no more findViewById()
• Anko: DSL for UI, extension functions

https://github.com/jetbrains/anko
• KApt: annotation processing
Kotlin Android Extensions
import kotlinx.android.synthetic.activity_main.click_me_button



public class MainActivity : Activity() {



override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)



click_me_button.onClick {

toast("Thank you!")

}

}
}
Kotlin Android Extensions
import kotlinx.android.synthetic.activity_main.click_me_button



public class MainActivity : Activity() {



override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)



click_me_button.onClick {

toast("Thank you!")

}

}
}
Kotlin Android Extensions
import kotlinx.android.synthetic.activity_main.click_me_button



public class MainActivity : Activity() {



override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)



click_me_button.onClick {

toast("Thank you!")

}

}
}
Anko: Android UI Builders
tableLayout {

for (location in locations) {

tableRow {

textView(text = location.name)

.lparams(column = 1)

}

}

}
Kotlin in the Community
How to succeed 

with Kotlin
57
Take initiative
58
Take initiative
• Kotlin is not a silver bullet and not a magical
solution for the problems of your project
• Kotlin makes you more productive and your work
more enjoyable
• Try it and share the results with your teammates
59
Don’t wait for a new project
• Kotlin can be easily integrated into existing Java
codebases
60
Where to start using Kotlin
• Tests - OK not informative
• Plugins and utilities - better
• Core and frameworks - best
61
Don’t fear the learning curve
• At JetBrains, summer interns become productive
with Kotlin very quickly and deliver great results
62
Use the Java to Kotlin
converter
• Convert only the classes that you’re going to
modify
• Cleanup and refactor the code produced by the
converter
63
Use the Java to Kotlin
converter
64
Summary
• JetBrains entrusts the most business-critical tasks
to Kotlin
• Kotlin works great for both server-side and Android
development
• Take initiative and start using Kotlin today!
65
Q&A
https://kotlinlang.org/
https://try.kotlinlang.org/
@kotlin
yole@jetbrains.com
@intelliyole
67

More Related Content

What's hot

Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersBartosz Kosarzycki
 
Feel of Kotlin (Berlin JUG 16 Apr 2015)
Feel of Kotlin (Berlin JUG 16 Apr 2015)Feel of Kotlin (Berlin JUG 16 Apr 2015)
Feel of Kotlin (Berlin JUG 16 Apr 2015)intelliyole
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyHaim Yadid
 
Kotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime PerformanceKotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime Performanceintelliyole
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinAndrey Breslav
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in actionCiro Rizzo
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoMuhammad Abdullah
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring frameworkSunghyouk Bae
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsBartosz Kosarzycki
 
Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Sunghyouk Bae
 
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 2017Arnaud Giuliani
 
Kotlin for Android devs
Kotlin for Android devsKotlin for Android devs
Kotlin for Android devsAdit Lal
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivitynklmish
 
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
 
ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersBartosz Kosarzycki
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and SimpleBen Mabey
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvmArnaud Giuliani
 

What's hot (20)

Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developers
 
Feel of Kotlin (Berlin JUG 16 Apr 2015)
Feel of Kotlin (Berlin JUG 16 Apr 2015)Feel of Kotlin (Berlin JUG 16 Apr 2015)
Feel of Kotlin (Berlin JUG 16 Apr 2015)
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
 
Kotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime PerformanceKotlin Bytecode Generation and Runtime Performance
Kotlin Bytecode Generation and Runtime Performance
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in Kotlin
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 
Kotlin
KotlinKotlin
Kotlin
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demo
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring framework
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projects
 
Introduction to kotlin
Introduction to kotlinIntroduction to kotlin
Introduction to kotlin
 
Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017
 
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 for Android devs
Kotlin for Android devsKotlin for Android devs
Kotlin for Android devs
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivity
 
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
 
ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developers
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 

Similar to Kotlin: Why Do You Care?

Kotlin for android 2019
Kotlin for android 2019Kotlin for android 2019
Kotlin for android 2019Shady Selim
 
The Present and Future of the Web Platform
The Present and Future of the Web PlatformThe Present and Future of the Web Platform
The Present and Future of the Web PlatformC4Media
 
From Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceFrom Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceStefanTomm
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorTrayan Iliev
 
Intro to kotlin 2018
Intro to kotlin 2018Intro to kotlin 2018
Intro to kotlin 2018Shady Selim
 
Kotlin / Android Update
Kotlin / Android UpdateKotlin / Android Update
Kotlin / Android UpdateGarth Gilmour
 
Kotlin. One language to dominate them all.
Kotlin. One language to dominate them all.Kotlin. One language to dominate them all.
Kotlin. One language to dominate them all.Daniel Llanos Muñoz
 
Building Mobile Apps with Android
Building Mobile Apps with AndroidBuilding Mobile Apps with Android
Building Mobile Apps with AndroidKurt Renzo Acosta
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Mohamed Nabil, MSc.
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioJonathan LeBlanc
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxGrace Jansen
 
A TypeScript Fans KotlinJS Adventures
A TypeScript Fans KotlinJS AdventuresA TypeScript Fans KotlinJS Adventures
A TypeScript Fans KotlinJS AdventuresGarth Gilmour
 
Programming with Kotlin
Programming with KotlinProgramming with Kotlin
Programming with KotlinDavid Gassner
 
Exploring Clojurescript
Exploring ClojurescriptExploring Clojurescript
Exploring ClojurescriptLuke Donnet
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)Eduard Tomàs
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016Codemotion
 

Similar to Kotlin: Why Do You Care? (20)

Kotlin for android 2019
Kotlin for android 2019Kotlin for android 2019
Kotlin for android 2019
 
The Present and Future of the Web Platform
The Present and Future of the Web PlatformThe Present and Future of the Web Platform
The Present and Future of the Web Platform
 
From Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceFrom Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practice
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and Ktor
 
Intro to kotlin 2018
Intro to kotlin 2018Intro to kotlin 2018
Intro to kotlin 2018
 
Koin Quickstart
Koin QuickstartKoin Quickstart
Koin Quickstart
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Kotlin / Android Update
Kotlin / Android UpdateKotlin / Android Update
Kotlin / Android Update
 
Kotlin. One language to dominate them all.
Kotlin. One language to dominate them all.Kotlin. One language to dominate them all.
Kotlin. One language to dominate them all.
 
Kotlin talk
Kotlin talkKotlin talk
Kotlin talk
 
Building Mobile Apps with Android
Building Mobile Apps with AndroidBuilding Mobile Apps with Android
Building Mobile Apps with Android
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptx
 
A TypeScript Fans KotlinJS Adventures
A TypeScript Fans KotlinJS AdventuresA TypeScript Fans KotlinJS Adventures
A TypeScript Fans KotlinJS Adventures
 
Programming with Kotlin
Programming with KotlinProgramming with Kotlin
Programming with Kotlin
 
Exploring Clojurescript
Exploring ClojurescriptExploring Clojurescript
Exploring Clojurescript
 
SCALA - Functional domain
SCALA -  Functional domainSCALA -  Functional domain
SCALA - Functional domain
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016
 

More from intelliyole

Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlinintelliyole
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEintelliyole
 
How to Build Developer Tools on Top of IntelliJ Platform
How to Build Developer Tools on Top of IntelliJ PlatformHow to Build Developer Tools on Top of IntelliJ Platform
How to Build Developer Tools on Top of IntelliJ Platformintelliyole
 
IntelliJ IDEA: Life after Open Source
IntelliJ IDEA: Life after Open SourceIntelliJ IDEA: Life after Open Source
IntelliJ IDEA: Life after Open Sourceintelliyole
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAintelliyole
 
IntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and PerformanceIntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and Performanceintelliyole
 

More from intelliyole (7)

Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlin
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
How to Build Developer Tools on Top of IntelliJ Platform
How to Build Developer Tools on Top of IntelliJ PlatformHow to Build Developer Tools on Top of IntelliJ Platform
How to Build Developer Tools on Top of IntelliJ Platform
 
IntelliJ IDEA: Life after Open Source
IntelliJ IDEA: Life after Open SourceIntelliJ IDEA: Life after Open Source
IntelliJ IDEA: Life after Open Source
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEA
 
IntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and PerformanceIntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and Performance
 

Recently uploaded

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Recently uploaded (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

Kotlin: Why Do You Care?

  • 1. Kotlin in the CommunityTeam Productivity Tools Languages Kotlin MPS TeamCity YouTrack Upsource IDEs IntelliJ IDEA PhpStorm PyCharm RubyMine WebStorm AppCode CLion .NET & Visual Studio developer productivity tools ReSharper ReSharper С++ dotCover dotTrace dotMemory dotPeek
  • 2. Kotlin: 
 Why Do You Care? Dmitry Jemerov <yole@jetbrains.com> 2
  • 3. 3
  • 4. • Statically typed programming language targeting the JVM • Support for functional and OO paradigms • Pragmatic, safe, concise, great Java interop • Free and open-source • In public beta, 1.0 coming Real Soon Now 4
  • 5. Outline • Why Kotlin was created • Kotlin feature highlights • How and why we’re using Kotlin • Where Kotlin works best • How you can benefit from Kotlin in your projects 5
  • 7. “We’ve built tools to support so many nice languages, and we’re still using Java” 7 JetBrains, 2010
  • 10. Thought Leadership • Programming languages are a popular discussion topic • IntelliJ IDEA is always going to have best support for Kotlin 10
  • 11. Good chance of success • Technical: experience building intelligent tools to support other languages • Marketing: company reputation and user trust 11
  • 13. Primary Constructor class Person(val firstName: String,
 val lastName: String) {
 
 }

  • 14. Properties class Person(val firstName: String,
 val lastName: String) {
 
 val fullName: String
 get() = "$firstName $lastName"
 }

  • 15. Properties class Person(val firstName: String,
 val lastName: String) {
 
 val fullName: String
 get() = "$firstName $lastName"
 }

  • 16. Smart Casts interface Expr
 
 class Constant(val value: Double) : Expr
 
 class Sum(val op1: Expr, val op2: Expr)
 : Expr

  • 17. Smart Casts fun eval(e: Expr): Double = when(e) {
 }
  • 18. Smart Casts fun eval(e: Expr): Double = when(e) {
 }
  • 19. Smart Casts fun eval(e: Expr): Double = when(e) {
 is Constant -> e.value
 }
  • 20. Smart Casts fun eval(e: Expr): Double = when(e) {
 is Constant -> e.value
 } class Constant(val value: Double) : Expr
  • 21. Smart Casts fun eval(e: Expr): Double = when(e) {
 is Constant -> e.value
 is Sum -> eval(e.op1) + eval(e.op2)
 else -> throw IllegalArgumentException()
 } class Sum(val op1: Expr, val op2: Expr)
 : Expr
  • 22. Extension Functions fun String.lastChar() = 
 this.get(this.length - 1) 
 "abc".lastChar()
  • 23. Extension Functions fun String.lastChar() = 
 this.get(this.length - 1) 
 "abc".lastChar()
  • 24. Extension Functions fun String.lastChar() = 
 this.get(this.length - 1) 
 "abc".lastChar()
  • 26. Nullability class TreeNode(val parent: TreeNode?,
 val left: TreeNode?,
 val right: TreeNode?) {
 
 }
  • 27. Nullability class TreeNode(val parent: TreeNode?,
 val left: TreeNode?,
 val right: TreeNode?) {
 
 fun depth(): Int {
 val parentDepth = if (parent != null) 
 parent.depth()
 else
 0
 return parentDepth + 1
 }
 }
  • 28. Nullability class TreeNode(val parent: TreeNode?,
 val left: TreeNode?,
 val right: TreeNode?) {
 
 fun depth(): Int {
 return (parent?.depth() ?: 0) + 1
 }
 }

  • 29. Nullability class TreeNode(val parent: TreeNode?,
 val left: TreeNode?,
 val right: TreeNode?) {
 
 fun depth(): Int {
 return (parent?.depth() ?: 0) + 1
 }
 }

  • 30. Collections and Lambdas fun nobleNames(persons: List<Person>)
 = persons
 .filter { "von " in it.lastName }

  • 31. Collections and Lambdas fun nobleNames(persons: List<Person>)
 = persons
 .filter { "von " in it.lastName }

  • 32. Collections and Lambdas fun nobleNames(persons: List<Person>)
 = persons
 .filter { "von " in it.lastName }
 .sortBy { it.firstName }

  • 33. Collections and Lambdas fun nobleNames(persons: List<Person>)
 = persons
 .filter { "von " in it.lastName }
 .sortBy { it.firstName }
 .map { "${it.firstName} ${it.lastName}” }
  • 35. Projects Using Kotlin • Kotlin • JetProfile (CRM, sales and license management) • IntelliJ IDEA 15 • YouTrack v.next • 2 new unannounced projects • Research projects related to bioinformatics • Plugins, Intranet services etc. 35
  • 38. JetProfile Project • Started in July 2013 • Replaces old Spring-based system • 100% Kotlin, 100k LOC • Team of 6 developers 38
  • 40. Kotlin in IntelliJ IDEA • In tests since version 14, in production since 15 • 74k LOC in Kotlin, out of which 18k in tests • A few developers actively using Kotlin • Kotlin team provides support with updating to new Kotlin versions 40
  • 42. 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
  • 43. Kotlin on the Server Side • 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
  • 44. Server-side Kotlin Frameworks • Kara: Web framework powering JetProfile
 https://github.com/shafirov/kara • Exposed: Database access framework
 https://github.com/JetBrains/exposed • Ktor: Experimental next generation Web framework
 https://github.com/kotlin/ktor
  • 45. Kara: HTML Builders fun HtmlBodyTag.renderPersonList( persons: Collection<Person>) {
 table {
 for (person in persons) {
 tr {
 td { +person.name }
 td { +person.age }
 }
 }
 }
 } 45
  • 46. Kara: HTML Builders fun HtmlBodyTag.renderPersonList( persons: Collection<Person>) {
 table {
 for (person in persons) {
 tr {
 td { +person.name }
 td { +person.age }
 }
 }
 }
 } 46
  • 47. Exposed: Table structure object CountryTable : IdTable() {
 val name = varchar("name", 250) .uniqueIndex() val iso = varchar("iso", 3) .uniqueIndex() 
 val currency = varchar("currency", 3)
 } 47
  • 48. Exposed: Entities class Country(id: EntityID) : Entity(id) {
 var name: String by CountryTable.name
 val allCustomers by Customer.referrersOn( CustomerTable.country_id)
 } 48
  • 49. Exposed: Queries val germany = Country .find { CountryTable.iso eq "de" } .first() 49
  • 50. Kotlin for Android • Compatible with Java 6 • Small runtime library • Great tooling in Android Studio • Compatible with existing Java libraries and tools • 100% Java performance
  • 51. Kotlin Tools for Android • Kotlin Android Extensions: no more findViewById() • Anko: DSL for UI, extension functions
 https://github.com/jetbrains/anko • KApt: annotation processing
  • 52. Kotlin Android Extensions import kotlinx.android.synthetic.activity_main.click_me_button
 
 public class MainActivity : Activity() {
 
 override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_main)
 
 click_me_button.onClick {
 toast("Thank you!")
 }
 } }
  • 53. Kotlin Android Extensions import kotlinx.android.synthetic.activity_main.click_me_button
 
 public class MainActivity : Activity() {
 
 override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_main)
 
 click_me_button.onClick {
 toast("Thank you!")
 }
 } }
  • 54. Kotlin Android Extensions import kotlinx.android.synthetic.activity_main.click_me_button
 
 public class MainActivity : Activity() {
 
 override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_main)
 
 click_me_button.onClick {
 toast("Thank you!")
 }
 } }
  • 55. Anko: Android UI Builders tableLayout {
 for (location in locations) {
 tableRow {
 textView(text = location.name)
 .lparams(column = 1)
 }
 }
 }
  • 56. Kotlin in the Community
  • 57. How to succeed 
 with Kotlin 57
  • 59. Take initiative • Kotlin is not a silver bullet and not a magical solution for the problems of your project • Kotlin makes you more productive and your work more enjoyable • Try it and share the results with your teammates 59
  • 60. Don’t wait for a new project • Kotlin can be easily integrated into existing Java codebases 60
  • 61. Where to start using Kotlin • Tests - OK not informative • Plugins and utilities - better • Core and frameworks - best 61
  • 62. Don’t fear the learning curve • At JetBrains, summer interns become productive with Kotlin very quickly and deliver great results 62
  • 63. Use the Java to Kotlin converter • Convert only the classes that you’re going to modify • Cleanup and refactor the code produced by the converter 63
  • 64. Use the Java to Kotlin converter 64
  • 65. Summary • JetBrains entrusts the most business-critical tasks to Kotlin • Kotlin works great for both server-side and Android development • Take initiative and start using Kotlin today! 65
  • 66.