r/learnjava • u/Denning26 • 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
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.