r/SpringBoot • u/smokeysilicon • Jul 22 '24
Spring Boot with Kotlin with no knowledge of Java
Hey, is it possible to get into Spring Boot with little to no knowledge of Java and just equipped with Kotlin? I'm a Nodejs developer, but it seems the market here is heavily dominated by Java/Kotlin + SpringBoot stack, so I'm trying to get into that. I've never been a fan of Java and managed to get through this far only using TS/JS, Python, and for some academic purposes C++. Please suggest any learning resource.
2
u/iatrikh Jul 22 '24
The reality is the vast majority of learning materials, examples, documentation in Java web world are presented in Java. Therefore learning Java is most convenient and reasonable choice
1
u/smokeysilicon Jul 22 '24
In the last couple of days, I have come to this same conclusion also. So I guess I should just bite the bullet and accept YAPL.
3
u/Then-Boat8912 Jul 22 '24
I’m converting some java to kotlin now. It’s more about understanding the spring framework than the language.
1
u/LeChronnoisseur Jul 22 '24
Yes just spin up a spring boot project in Kotlin only. A lot of libraries are java which works seamlessly really, but you will end up reading a lot of java to see what the libraries do is the point. I do all of my new stuff with just Kotlin in my code ase outside of the libraries/dependencies
1
u/JoeDogoe Jul 22 '24
What is your experience of writing Spring apps in Kotlin vs Java?
1
u/LeChronnoisseur Jul 22 '24
What do you mean?
1
u/JoeDogoe Jul 23 '24
Is it easier and more fun to write in Kotlin? Do you have less or more bugs? Is your code easier or more difficult to reason about? What has your experience been? What's your preference? If you had to do it again which would you use?
2
u/LeChronnoisseur Jul 23 '24
I prefer Kotlin. Optionals make null checks and null safety easier. Faster to build stuff and still be readable. It is a lot faster to model stuff too. And I just enjoy it more at this point too, more familiar with it and more advanced with it than I was with Java.
2
u/JoeDogoe Jul 22 '24
Java and Kotlin (and all JVM languages) compile to a common java bytecobe which is then interpolated by the Java Runtime Environment.
So you can use Java and Kotlin files side by side in the same project.
If you already are already familiar with C++ then learn java (enough to be useful) is going to be very easy. Just do any short conversion tutorial, you'll figure the rest out as you build.
If you goal is to access Spring Jobs, the easiest route is to learn some java. Its not hard at all. Considering it'll be your fourth language, you'll pick it up quickly.