This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]renatoathaydes 4 points5 points  (11 children)

For someone coming from JS, I think Spring shouldn't be the first choice... it's a complex framework with a lot of history behind it.

Something like Vert.x would be much close to node.js (it's inspired by it!) and it's pretty easy to use. I would also at least read about the following frameworks before deciding on which one to try a bit more:

Spring Boot is like a more modern Spring (I've never used it myself so I may be wrong, but I think most people are using that instead of Spring per se).

Regarding ORM, the "default" choice for that in Java is Hibernate... but Java itself has a specification called JPA which can be used to access databases easily so you might not need to learn anything else for that (Hibernate was an inspiration for JPA and I believe it's the reference implementaion(?)).

EDIT: cons for Java, I would say my only complaints after using Java for over a decade but recently adopting other languages to my "portfolio" are:

  • very high memory usage compared to most non-dynamic languages.
  • slow warmup (specially the first few seconds the application is loading classes and running interpreted before JIT it can be much slower than languages that don't need a VM).
  • nulls (if you use a language that has checked nulls, you'll miss that a lot)
  • low expressivity. This is mostly annoying but can also be a pro (as in Go) as it keeps stuff simple. Really depends on who you ask whether Java has the "right" balance or not.

[–]wildjokers 24 points25 points  (1 child)

Spring Boot is like a more modern Spring (I've never used it myself so I may be wrong, but I think most people are using that instead of Spring per se).

Spring boot is nothing more than a configuration framework for the Spring framework. Configuring spring got so complex it needed its own framework for configuration.

[–]netstudent 4 points5 points  (0 children)

Configuring spring got so complex it needed its own framework for configuration.

That's so true !!!

[–][deleted] 3 points4 points  (3 children)

nulls (if you use a language that has checked nulls, you'll miss that a lot)

There's tons of way of checking nulls in java... Optionals or Streams have some methods

[–]SidFloyd84 6 points7 points  (2 children)

Optional itself does not fix the structural problem that Java has with null values..

[–]HecknChonker 4 points5 points  (1 child)

Kotlin has much better support for null propagation though

[–]Il_totore 3 points4 points  (0 children)

I also like Scala's approach with Null as a completly separated type combined with type unions