r/learnjava • u/desktoppc • Dec 12 '20
[ASK] How to Learn Java Spring?
I have a background in backend development using Python Django, but now I have to use Java Spring. I can do programming in Java but haven't used Spring.
But the problem is there are so many Java Spring framework like Hibernate, Security, MVC, etc. In addition, I also see that we have to define our ORM implementation like how to make the SQL query, etc. I haven't done anything like that because in Python Django the ORM implementation has been made by the framework.
I would like to learn how to make a REST API as most of the backend job required this for Junior Engineer (Fresh Graduate), how do I start? do I need to learn all java spring framework?
78
Upvotes
2
u/[deleted] Dec 12 '20 edited Dec 12 '20
Cemex -> Novell -> IBM -> Amazon...
That's my history. Spring is less performant than EJBs for instance. We tested it when I was at IBM, it might have changed now but I don't see hard data to refute our previous findings.
https://github.com/luiz158/spring-vs-ejb-vs-cdi-benchmark
https://adam-bien.com/roller/abien/entry/high_performance_java_ee_from
At Amazon there's Coral where tou define the api and it generates the clients for you.
Spring is also not cloud optimized. Container images have a last layer which is in the hundreds of Megabytes, thus losing all benefits of image layer caching.
Regular wars can be in the hundreds of Kilobytes (3 orders of magnitude smaller than Spring) for the last layer and I can deploy 50 times per day and just send the last layer to the container regsitry, pipelines are faster, etc.
If you want to use something more powerful, you can start with microprofile.io and once you're ready, you can take your microprofile and put it in quarkus.io
If you're used to deploying jars, then most vendors provide a way to create uberjars like Spring does, but that feature is not popular anymore. Payara-micro does this.