Hello Kotlin Community. I'm looking for a deep div...
# getting-started
m
Hello Kotlin Community. I'm looking for a deep dive in Kotlin with Spring Boot. I'm new to Spring and don't have any Java Experience. This is why most ( actually good) Tutorials don't bring me further. Thanks for your help 😘
t
Do you have any experience with any other programming language ? Like JS, PHP, Go, Python... anything that's used for server-side web development ?
m
Jes node.js
I would say I'm on Junior Level.
I like pretty much the way www.baeldung.com explains Spring boot. The only downside is, it's all Java and I get pretty confused when I learn how to use the framework in Java and have to do it in Kotlin later on...
t
My first suggestion is that you learn Kotlin to be more familiar with the language. Syntactically, Kotlin is rather close to TypeScript: 1. The type of a variable is declared to the right of its name, and is optional if the type could be inferred from initializer 2.
const/readonly
=>
val
,
let
=>
var
,
function
=>
fun
3. Classes work the same, you could also define getters/setters with
get/set
, constructor with
constructor
(but Kotlin has shorthand syntaxes) 4. Both access properties of objects with the
.
dot notation (
foo.bar.baz()
) 5. Both have special syntax to handle `null`:
foo?.bar?.baz() ?: "one of foo or bar is null"
6. Both have generics.
kotlin Koans are great to get started with the syntax by solving simple online puzzles : https://play.kotlinlang.org/koans/overview
Indeed, Baeldung is a great resource for learning Spring Boot but since Spring has just started to move to Kotlin, most resources are still written for Java. You'll notice that Kotlin draws a lot from Java, and once you'll know more about Kotlin's syntax, you should be able to understand Java code, which is similar (but quite verbose, and type of variables are on the left)
m
Thanks for your help @tseisel