Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Is There an Equivalent of Spring Boot for Kotlin?
Jean-Michel 🕵🏻‍♂️ Fayard
Jean-Michel 🕵🏻‍♂️ Fayard

Posted on • Edited on

     

Is There an Equivalent of Spring Boot for Kotlin?

My career-related content is nowopen-source on GitHub.

If you look at my DEV profile, or meet me in person at a Meetup, I am sometimes the kind of guy that can't shut up about the fact that Rust-empowers-you-to-use-computer-memory-safely-but-with-zero-overhead. But in my case about how I enjoy Kotlin on anything that doesn't start with "And" and ends with "roid", and in particular on the backend side of things.

The darker side of the story

It's my time to be honest and reveal thatthere is a darker side to this story.

Actually I already wrote about this three years ago, because it's a reccuring irony of my life.

But I'm job hunting right now, and it is hitting me. Again. Just because there is Kotlin on my CV, the LinkedIn beast is assuming once again that I am an Android enthusiast and overwhelm me accordingly.

You are probably asking yourself:

But why don't your clarify things by putting as first line of your LinkedIn profile? "Hey, I speak Kotlin but I'm not an Android developer, I'm a Backend developer".

Dear sweetie:you vastly underestimate just how dumb LinkedIn is.
When you do that, you reliably get not less butmore Android stuff.

And I take a deep breath and I get real high

And I scream at the top of my lungs

What's going on ?

What's going on?

The simplest explanation would be that there are lots of Android jobs but few backend jobs. But only the first half is true.

Truth is that there is a big imbalance in the Kotlin world:

JetBrains is doing the bulk of the engineering
Google is doing the bulk of the marketing, Android related.

If you are deep in the Kotlin world you can point out good counter examples.
But you are not my audience.

Is there an equivalent of Spring for Kotlin?

I was discussing in a Discord with a relatively mid level to senior backend developer. He asked me how I backend stuff, so I started not shutting up about how Kotlin. He was polite but also skeptical. Clearly not the first time he had heard about Kotlin, but he was not convinced. But still interested enough.

And then, he asked me this:

Is there an equivalent of Spring Boot for Kotlin?

I was struck by the simplicity of that question.

So I took a deep breath, didn't get real high, and without screaming, I replied simply:

Absolutely: the equivalent of the Spring Boot for Kotlin is.... Spring Boot itself.

Now it was his turn to be struck by the simplicity of my answer. So I went on.

Spring with Kotlin works the same than Spring Java. And mostly it's a no brainer. You can googleSébastien Deleuze kotlin spring, this guy from the Spring team has been working like a greek hero for a very long time: fixing issues small and big, creating libraries, producing sample projects, writing articles, giving talks, ...

At that point, everything clicked for him, and he was in mode "oh my god, I didn't realize that, I'm going to try it, like very soon". Days later he told me he did. That I was not lying :)

Kotlin's Biggest Problem?

A second fun discussion with a simple question and answer happened recently on Slack.

This time it was with an IT professional trainer. He gives training on all sort of things, including Java and Kotlin. Obviously, I asked how that went but he replied.

  • Kotlin training is kind of boring to be honest. If the audience already know Java, it's mostly the same concepts under new clothes. Right, a few new concepts here and there, but you can cover that quickly and be done.
  • Well you are right, probably not great for a 2 days workshop. For us on the other hand, it's a good thing that you can take an existing Spring/Java developer, take her real expertise (backend programming) and help her learn Kotlin quickly.
  • Fair enough. But now hear me on this: do you know what Kotlin's biggest problem on the backend is?

I've had this discussion before, so I could easily imagine some bad and a few good answers to this question.

But I sure wasn't expecting this one:

Kotlin's biggest problem is its name.

Different Languages, the same Java Ecosystem

Before 1763, the same version of French was spoken in Québec and Paris. That same year, "New France" stopped to exist and the people living there became a francophone island inside the mighty British Empire. For a very long time, the two versions of French were isolated and started to diverge.

My mother tongue is the variant from Paris. I went to Québec when I was 20, and my first day and I couldn't understand half of what people said to me. It was confusing and frustrating as hell. Story doesn't end here though. Soon after I recognized the pattern between our differences, could understand have normal conversations, even started to like it, and for the rest, strange words liketabernacle, I just used Stackoverflow.

You know where I'm leading with this analogy: Java/JVM and Kotlin/JVM are not like Portuguese and Chinese, they are like French/France and French/Québec.

Different languages but the same Java ecosystem.

We share most of the same language concepts, the same JVM, the same IntelliJ IDEA, the same Gradle biuld tool, the same libraries (huge deal), many good practices, we interoperate seamlessly, and to take this example, we have Spring in common.

So Why Didn't JetBrains use a Name Closer to Java?

When I'm job hunting, I wish indeed that Kotlin was called something much closer to Java.

Which name? It couldn't be Java 2.0 because Java itself is improving (version 20 now) and that's a good thing that the whole ecosystem goes forward.

Maybe Java++? When Bjarne Stroustrup called its languageC++, he found probably the most effective way to both claim the legacy of C, the big master of the day, and that he wanted to offer something better.

Now the issue is that C++ is a strict superset of C, so everything that works in C needs to work in C++. That makes for a super smooth transition: there is this story that I choose to be true, that many of the early C++ developers were C developers who only wanted to use one-line comments. That also brings a long term huge technical debt, because everything bad that exists in C is still in C++ by definition.

Kotlin is not like that, it is more a refactoring of Java. JetBrains took what I would say is the hard path, they didn't want to only add good thing, they also wanted to remove the parts that they found didn't work well in practice. Like the billion dollar mistake or checked exceptions.

JavaScript would have been a pretty good name too, but it was already taken by a famously successful language that has famously nothing to do with Java. Would have been nice if Netscape called their language TypeScript. This would have required to postpone the language for Netscape 2.0 and get it right. Which would have been awesome. Alas, we don't have a time machine AFAIK.

The names Java and Kotlin are in fact linked

Many people know the origin story of the name "Java", but it became such a huge success that I would guess that many many more don't know it. In fact, while researching for this article, I realized that Java's origin story ismore complex and mysterious than I thought.

Here is my simplistic version:

Java engineers were struggling with the names they had like Oak or WebRunner so they went to brainstorm. They were drinking their favorite foreign coffee from the foreign island ofJava, Indonesia.

Image description

Now Kotlin's origin story sounds familiar

Kotlin engineers were at JetBrains office in Saint Petersburg looking for a good name. They remembered the beautiful foreign island of Kotlin just outside.

Image description

So in case you missed it, there always was a link, and lots of water, between Java and Kotlin.

If you knew it already, doesn't matter: LinkedIn will always assume that we are Android enthusiasts.

🙏🏻Thanks for reading

Please send the article to a friend that needs it.

Hi, I’mJean-Michel Fayard. On my website, you canask me a question or see some coolprogramming memes.

Top comments(16)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
dmahely profile image
Doaa Mahely
Software engineer and web developer. I like to code.
  • Location
    UTC+4
  • Education
    B.S. in Software Engineering
  • Work
    Developer
  • Joined

I agree there are a lot of misconceptions about Kotlin. I've had people ask me what I use at work and immediately assume I'm an Android developer when I say Kotlin. Plus, I see a lot more tutorials for Kotlin in mobile development than in web development.

CollapseExpand
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Email
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined
• Edited on• Edited

KotlinConf just happened in Amsterdam and results are in: Kotlin is used two third of the time to do Android stuff, one third to do all other kind of stuff with a majority of that rest being backend stuff.
Obviously 2/3 is a lot, and no wonder, Android is a massive success story.
But the other third matters too and has a right to exist.

CollapseExpand
 
marianvarga profile image
marian-varga
I love to integrate.
  • Location
    Vienna, Europe
  • Joined
• Edited on• Edited

Yeah, it's a shame everyone associates Kotlin with Android. SpringBoot with Android is just great...
With the current geopolitical situation the name is not the best PR though :(

CollapseExpand
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Email
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined
• Edited on• Edited

On the contrary, that's what courage looks like

blog.jetbrains.com/blog/2022/03/11...

CollapseExpand
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Email
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined

This article blew up unexpectedly, but I'm very honored to have been featured onThis Week in Spring - April 11th, 2023

CollapseExpand
 
danielmpries profile image
Dan
Technology Manager at M&T Bank with a passion for enabling teams to deliver to the cloud.
  • Location
    Buffalo, NY
  • Education
    BS Management Info Systems minor Business, MCPS
  • Joined

Spring is big ecosystem and Boot generally builds on Spring's opinion's as it relates to their entire ecosystem. This isn't a bad thing . But if you want a different set of opinions take a look atmicronaut.

CollapseExpand
 
mi_native_nutt profile image
Mark
  • Joined

Actually Micronaut was a direct copy of spring. They didn't even actually change any of the documentation or package names at first. So basically you're using a lesser version of spring boot

CollapseExpand
 
mi_native_nutt profile image
Mark
  • Joined

If you want something different then maybe look at q u a r k u s

CollapseExpand
 
rytis profile image
Rytis
Independent consultant, developer, content creator, mentor with 10+ years experience in making things happen.Check out my coding channel: https://www.youtube.com/@rytis-codes
  • Email
  • Location
    Lithuania
  • Work
    A guy in a hat @ rytis.codes
  • Joined

I've tried Kotlin, and honestly I didn't like the syntax. For some reason, I can't get behind types after arguments and functions, but maybe that's just me being old.

CollapseExpand
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Email
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined

If java isn't broken for you, don't fix it

CollapseExpand
 
rytis profile image
Rytis
Independent consultant, developer, content creator, mentor with 10+ years experience in making things happen.Check out my coding channel: https://www.youtube.com/@rytis-codes
  • Email
  • Location
    Lithuania
  • Work
    A guy in a hat @ rytis.codes
  • Joined

Exactly my thoughts. I like the verbosity and C style syntax

CollapseExpand
 
mateuszstefek profile image
Mateusz Stefek
  • Location
    Warszawa, Poland
  • Joined

I couldn't care less about the syntax. Kotlin greatest features are:

  • null safety built into the type system (Java's Optional are a disaster)
  • named parameters of functions/constructors
  • default expressions for parameters
  • extension methods (OK, this is a syntax thing, but still great)
  • better type system for collections, promoting immutability

These eliminate 90% of boilerplate code Java is famous for.

CollapseExpand
 
illutax profile image
Illutax
  • Joined

This whole article should be: "Yes, there is Spring Boot for Kotlin, it's spring Boot."

CollapseExpand
 
zaneschepke profile image
Zane Schepke
I like to add value to people with coding

Quarkus

CollapseExpand
 
kilaka profile image
Alik Elzin
  • Joined

What about using coroutines with spring? With spring graphql?

CollapseExpand
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Email
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined

I think you are missing the point of the article

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
  • Location
    Berlin, Germany
  • Education
    ENSIMAG + Universität Karlsruhe (TH)
  • Pronouns
    he / him
  • Work
    Kotlin, Backend, Open Source maintainer, Technical Writing
  • Joined

More fromJean-Michel 🕵🏻‍♂️ Fayard

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp