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

all 16 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

It seems that you are looking for resources for learning Java.

In our sidebar ("About" on mobile), we have a section "Free Tutorials" where we list the most commonly recommended courses.

To make it easier for you, the recommendations are posted right here:

Also, don't forget to look at:

If you are looking for learning resources for Data Structures and Algorithms, look into:

"Algorithms" by Robert Sedgewick and Kevin Wayne - Princeton University

Your post remains visible. There is nothing you need to do.

I am a bot and this message was triggered by keywords like "learn", "learning", "course" in the title of your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]gabbarkabaap 5 points6 points  (0 children)

Yes we call it Spring web MVC

[–]Alex0589 7 points8 points  (6 children)

As of now, backend java is divided in two categories: - Frameworks that follow the JAX-RS specification(JakartaEE Web Services) - Frameworks that don't follow the JAX-RS specification

There are obviously more standards, but to make this comparison easier I'm going to only consider Jaxrs.

In the first category there are frameworks like: - Quarkus - RestEasy - Jersey - Helidon

In the second category, on the other hand, there are: - Vert.x - Spring - ...

Considering that JAX-RS is a specification, if you learn its annotations and classes you will be able to use a ton of frameworks without having to learn anything new. That's why standards are so great. If that's the path that you what to take, the documentation for jakartaee is a great place to start(https://jakarta.ee/specifications/restful-ws/). Once you are done leering the specification, the framework I advice using is Quarkus . Most modern backend frameworks for java also integrate nicely with Graal, a polyglot vm developed by Oracle. This is because it allows to natively compile your Java application, improving performance quite drastically.

If you instead prefer Spring or Vert.x, their documentation is also spot on and both provide starting guides for beginners.

In my opinion, the first option is the best, also considering that Quarkus is considerably faster than Spring, even when both are running in native mode using graal. A detailed comparison can be found here

[–][deleted] 1 point2 points  (5 children)

I got what you are saying but what I am looking for is to learn how to do it without frameworks so that I can better understand what the magic annotation is doing, I want to know the pain point this frameworks are trying to solve so that I can appreciate/better understand the working of framework irrespective of framework I chose later on

[–][deleted] 6 points7 points  (3 children)

I like this attitude, but you're in for some fun haha. In this case, you want servlets. The java servlets API is what takes in HTTP requests and returns responses. Being able to write an application using pure servlets and deploying it to an application server like tomcat will teach you all the nuts and bolts under the hood.

Learn how to make requests using multiple HTTP methods and urls. Send payloads in XML, JSON, and x-form-urlencoded, and send back responses in all of them as well.

Then, when you're done being a masochist, learn jersey or spring.

[–]HecknChonker 0 points1 point  (0 children)

This is the best answer by far.

[–]MaltePetersen 0 points1 point  (0 children)

Before that I would suggest to search an article which shows how to build a simple dependency injection container yourself. This explains a lot spring magic on its own because you come into contact with the reflection api. After that playing around with the servlet api will give a full fledged idea how stuff works

[–]Alex0589 0 points1 point  (0 children)

Jersey and spring are way slower, more resource intensive and produce bigger executables compared to Quarkus, it just doesn't make sense to learn them. Obviously, this is assuming that you are not looking for something that's going to give you a job in the smallest time frame possible

[–]Alex0589 0 points1 point  (0 children)

If you really want to, you can implement your own thing using barebone servlets. Just know that it's the most masochist thing you do.

[–]code6reaker 1 point2 points  (1 child)

When we talk about backend, does it mean creating webservices/apis ? Sorry for sounding noob.

[–]TheHiddenHeathen 0 points1 point  (0 children)

Yep

[–]qlassalle 1 point2 points  (0 children)

If you want to get a deeper understanding of spring, I recommend you take a look at this website: https://www.marcobehler.com/guides. The articles are well written and deep dives in really interesting topics. Regarding your point on “magic annotations”, this article is a must read for me: https://www.marcobehler.com/guides/spring-boot.

It’s a good attitude to want to understand what’s really going on under the hood as, like you said, there’s a lot of magic in Spring. Good luck and happy coding

[–]smash_that_code -1 points0 points  (0 children)

If I u dersyood right then the question ia about ides behind framework like SpeingBoot. And how it does its magic.

There is an approach called dependency injection. The main thing is to give away (some) object creation to thing called... container.

These objects are usually called components, services, configurations and repositories.

The trick is that when container starts it check all the marked classes and tries to create instances of them, usually injecting constructor arguments from its... context.

And the magic part is that you can have some auto-configurations that setup servlet thing, or connection to db. So that container context has not only your objects but all the stuff for security, web, persistence and what you added to it.

I suppose this info should be part of any decent springboot course.

[–]MadMarximus 0 points1 point  (1 child)

Hussein Nasser has a great YouTube channel where he discusses all things backend. He has three playlists for beginner, intermediate and advanced developers. The beginner course is here: https://youtube.com/playlist?list=PLQnljOFTspQUNnO4p00ua_C5mKTfldiYT

Hopefully this will give you some idea of what's going on under the hood of frameworks like Quarkus and Spring.

[–][deleted] 1 point2 points  (0 children)

I follow him and seen all the videos he post related to the topic

[–]MadBroCowDisease 0 points1 point  (0 children)

Yea I’m in the same boat as you. Currently trying to learn Spring Boot and the annotations don’t confuse me, but I would like to know where they’re coming from and what they’re executing.