0

I want to study Java + Spring Boot but I hate the long syntaxes and boilerplate codes. Too many codes to do simple things turns me off.

Comments
  • 1
    Java + Spring boot + Hibernate + JPA + Swagger + Lombok.

    If you start your project with those, you can pretty much build a backend for a pretty complex project in less than 2k lines *total*. Especially with proper mastery of all the modules and the annotation power Spring and it's modules expose.

    I have a decent amount of experience with these and more, and on a recent interview I was asked to create a backend for an application as an example, had like a week for it or so?

    I managed to check off all the requirements, even optional requirements, done it in 2 days, and on later interview the interviewer even commented, that there's not a lot of code to actually comment on.... to which I said "yeah, don't re-invent the wheel, I used spring efficiently to deliver on the requirements, that's all."

    They clearly wanted to judge my code more and were disappointed by this xD but still took me, because you can't argue with it either
  • 0
    I don't event know JPA, Hibernate and Lombok lol. And also that I need to study lots of related Java + Spring Boot technologies like that.

    So I think I will become a Java + Spring Boot guy in the future coming from PHP and Javascript (React + Angular)
  • 0
    @Devnergy

    Don't worry about it, Hibernate and JPA are essentially just db agnostic layers over a database. You should definitely start learning the basics of these, since they can speed up creating queries and models by a ton.

    Lombok is a boilerplate generated using annotations, it's not even a spring module but an annotation processor plugin on top of your IDE, that will generate tons of boilerplate for you! This one is almost a must for any Java project, not just Spring projects.

    another pretty useful boilerplate remover is MapStruct that you can use to map between DTOs and Entities, just keep that in mind for the future, you don't need to know this right now.

    I definitely whole heartedly recommend spring-boot for robust backend applications. Even though it's on the heavy side, it does a lot of things really well in my opinion, and you can learn a lot fast with it too!
  • 0
    Then just use kotlin + spring boot if you dont like java's verbosity

    And like mentioned elsewhere, lombok is your friend in java.

    But really, its not that bad, spring provides so many features and has sensible defaults in most cases. The only thing id complain about is the startup time of jvm+spring.

    Sure java is more explicit and has fewer shorthands than some languages but spring is probably the best framework ive ever seen for any language.
Add Comment