r/learnjava • • Nov 10 '22

Java, Spring programming NSFW

Hello guys👋🏼 I’ve been learning Java for about 3weeks now from YouTube videos , I’ve mastered some basic concepts but I don’t understand stuffs like Spring, web services, hibernate, JPA. I feel like I’m not going forward just standing still and it’s heart aching. I’d really like to get a complete Java roadmap from beginner to advanced. Anyone willing to mentor a beginner? for accountability and guidance...I’d appreciate, thanks!

50 Upvotes

25 comments sorted by

View all comments

23

u/josephblade Nov 10 '22

I think you should really stay far away from spring, hibernate, jpa when you are still learning the language.

I would stick to language fundamentals (operations, control structures, data structures) and start building your own programs with those before even thinking about frameworks. I wouldn't even use generics (outside of the standard library usage like List<String> ) or functional programming until you are comfortable writing for loops, while loops, if/else if , constructors, inheritance, and basic I/O. And then I guess javaFX. (I grew up on swing which was the worst so I find it hard to recommend. but javafx might be better)

When you have this and can create applications with this (tic-tac-toe, calculator, even tetris if you picked up javafx)

frameworks (like spring) are intended to take away the complexity when you build large interconnected multi-entry applications. as in things that serve more than one purpose that need to have replacement code plugged in without the rest of the system needing to change. It becomes useful later on when you do make something that

Once you start on things like databases and external libraries, stuff you add to your classpath, it becomes convenient to use spring to plug these library provided components in. for databases it would be database drivers. For other components there are others. Like loading json using jackson, you can do it without spring and it works fine. But it is convenient to put your config in 1 spot that the framework can find and be sure that every time you get a parser, it will be configured as you want it.

7

u/[deleted] Nov 10 '22

I think if a endpoint for him is to find a job asap it's a bit of waste of time to go throughout javaFX as it is never used as be developer. Instead of it he can try to make some simple crud for ie todolist, with usage of spring or things that he will end using while taking a job.

3

u/josephblade Nov 10 '22

depends on what he wants to do really. I found basic swing knowledge useful to get pixel rendering going for a simple graphical game. it allowed me to play with pixel blending and make simple games.

not everyone wants to build API's :)

1

u/[deleted] Nov 10 '22

Yea thats true but i quessed that he wanted to do it as he mentioned only api frameworks, in his orginal post

3

u/[deleted] Nov 10 '22

But things like calculator/tic tac toe are nice projectst to do while you are still at the beggining of your journey to start thinking like programer