As a noob who started learning Kotlin about a mont...
# spring
j
As a noob who started learning Kotlin about a month ago (with almost no experience with Java, just skimmed through the Oracle’s Java 8 documentation before jumping into Kotlin) and just started with Spring framework, I want to ask for advice about how I should learn further. I followed the tutorial https://spring.io/guides/tutorials/spring-boot-kotlin/, but of course this just was merely getting a taste of it. Can anyone give some advice how I should further learn about the Spring framework efficiently? Some questions that I had in mind: 1. Is it better to go through Spring Framework’s documentation before going through Spring Boot’s documentation? 2. Is it better to start with simpler frameworks, such as Spring MVC, before jumping into Spring WebFlux?
a
1. Spring Boot will be easier to start, especially with no experience 2. Depends on your previous experience in other languages, but I'd say MVC is much easier to begin with, also there are more tutorials. And you don't need WebFlux, unless you want async IO for some reason (high load (e.g. thousands of rps), or want to preserve resources (memory/cpu usage), or faster startup time).
j
@alex Thanks for the reply. 1. I’ll start with Spring Boot’s docs then. 2. I see. I thought that the demand for non-blocking application were growing, since a lot of people talk about reactive frameworks these days, and Kotlin also talks a lot about the advantages of coroutines. So I thought that learning reactive framework like WebFlux would be almost like a must. Anyways, I will first go with MVC. I guess it’s better to go step by step.
a
Reactive programming is heavily advertised, but it's definitely not a must, there are tons of companies and projects who still use MVC and are happy with it. Coroutines shine when you have complex business logic. It so happens, that reactive code look like shit it that case, while imperative is really looking good. Coroutines allow you to write async code pretty close to sync counterpart. But again, it's relevant for big scalable applications with high load, MVC will be totally ok and much simpler for beginner (especially when you'd want to add database and other features).
👍 2
m
Maybe, for the start, before you start coding, read this: https://www.marcobehler.com/guides/spring-framework It's an amazing article and it will help you understand how Spring works and what it provides you. Then, when you create your first project using Spring Boot, less thing will be magical to you which always helps if you have some kind of an issue.
👍 1
c
I would actually suggest mix and matching spring boot and spring docs. Some of the spring boot stuff seem like magic if you don't know basics of Spring Framework, and magic is a bad thing when software development is concerned. I'd definitely start with reading Spring Framework Reference -> Core first, then jump into Spring Boot guides. Testing part is also a must. As a next step, build an app, use something you're into personally, even if there is already an app that does something and it's good, still build your own, it doesn't have to be super shiny, but it'll give you necessary experience.
👍 1
j
Thanks a lot for the info and advice! I also prefer to program while knowing at least slightly what’s going on under the hood, so I guess I’ll read the Spring Framework Reference -> Core first. But it’s also kinda true that one learns only when one starts to really program and build sth, and one could get overwhelmed if starting with things too deep, so I hope I don’t spend too much time stuck reading it 🙃.
@mister11 This article is great to begin with! Thanks!