You are on page 1of 13

KOTLIN AS A BACKEND

AN USECASE

1
INTRODUCTION
ABOUT US

• Team Optophone
 We deal with document and data capture.
 Most of the team is formed by Java Developers.
 Some are in their first programming job.
 No one in the team, except for me, ever touched
Kotlin before this assignment.

2
INTRODUCTION
OUR PROBLEM

• We have a legacy system


 Our legacy system, SDCA, is a monster and it will be killed.
 It’s a monolith, really hard to give maintenance and broke every letter in
the SOLID principle.
 It’s really, really verbose.
• We are building a new one(s), greenfield!
 Event-Driven Architecture.
 Microservices in AKS.
 We use Quarkus as a base framework.
 We decided to go with Kotlin instead of Java!

3
4
KOTLIN

BUT WHY?

“OMG, we are a bank, we need 6,022 140 76 × 1023 steps of approval, do we really need to do
that? Do you want this headache?”.
“Yes, hold my beer” – Team Optophone

• We started by designing our software, no code was written and no


technology was chosen until we designed what we needed to do.
• After the design sessions, we went down to the following points:
 We will be event-driven
 We want to be thread-safe and facilitate distributed computing
 We don’t want to build another SDCA
 We want to write less and more concise code
 We want to own our solution

5
KOTLIN
WHAT IS KOTLIN

• It’s a JVM language


• It’s maintained by Jetbrains
• It’s currently at version 1.5.20
• Interesting Functionalities
 Native Null-Safety
 Complete Interop with Java
 Proper Function Types
 Support Reified Generics
 No checked exceptions
 Extension Functions
 Type alias
 Operator Overloading
 Coroutines
 Immutable by Default
 Smart Casts
6
MOST LOVED LANGUAGES: STACK OVERFLOW 2020 SURVEY

7
KOTLIN
INSIDE ABN AMRO

• What about building?


 We use the same pita-pipeline templates for Java maven, no change is
required.
• Security wise, did you validate it?
 Kotlin generates Java 8 or 11 compatible bytecode, particularities are
now validated by the current Fortify version used at Abn Amro
 It’s supported by Nexus IQ
 It’s supported by Sonar
 Pretty much the same stuff that we apply to java, we can apply to Kotlin.
• What about Code Quality?
 We are enforcing it on developer-machine using Detekt and SonarLint,
to reduce bike-shedding and keep the same formatting between our
codes.

8
KOTLIN
PEOPLE WISE

• Is your manager, P.O and scrum master aware?


 Yes, it was a team discussion, we decided together and we stand for our
decision.

• Overall, how is the team dealing with it?


 Some learning curve at first, we did a lot of pair programming and
learned it together.
 The development speed is good and the team seems confident.
 We are happy with the code-quality and code legibility.

9
KOTLIN
NEGATIVES?

• On Abn Amro, Kotlin is used only for apps, so the community is smaller.
• It is a deviancy from the “Default WoW” of the bank.
• Has a small learning curve, but is there.
• Harder to find Developers out-the-box
• People are resistant to try new stuff.

10
KOTLIN
OUR NUMBERS

11
KOTLIN
OUR NUMBERS

12
KOTLIN
TALK IS CHEAP, SHOW ME THE CODE

https://dev.azure.com/cbsp-abnamro/GRD0001016/_git/doremi
13

You might also like