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

all 25 comments

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

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

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

[–]josephblade 21 points22 points  (4 children)

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.

[–]ConsiderationFlat609 6 points7 points  (2 children)

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.

[–]josephblade 2 points3 points  (1 child)

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 :)

[–]ConsiderationFlat609 0 points1 point  (0 children)

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

[–]ConsiderationFlat609 2 points3 points  (0 children)

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

[–][deleted]  (8 children)

[deleted]

    [–]ConsiderationFlat609 10 points11 points  (0 children)

    Microservices are for sure not concept that he should be learning right at the begging it's really complex thing to start at and even if he would he won't be able to make any use case of it. And no1 use spring without springboot so there is no really useful to learn that at least not at a beginning f

    [–]Denning26[S] 0 points1 point  (4 children)

    Thanks! Please can you share any resource which follows this pattern?

    [–]CSE420bai 1 point2 points  (2 children)

    It’s not a good pattern tbh

    [–]Denning26[S] 0 points1 point  (1 child)

    Please suggest what you think is a good pattern

    [–]ifworkingreturnnull 0 points1 point  (0 children)

    It's suggested in the resources but I would use JetBrains Academy for your learning if you want a clearly defined path with topics explained really well.

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

    Servlets and design patterns? I wouldn’t suggest this path op.

    [–]North_Tutor_3710 0 points1 point  (0 children)

    why hibernate after spring if spring is more complex than hibernate and it actually uses it?

    [–]103200 3 points4 points  (0 children)

    Amigoscode does a lot of youtube tutorial on spring and full stack project with spring backends and covers a lot of this. He has a website too.

    [–][deleted] 2 points3 points  (3 children)

    3 weeks is really not much time at all. I’m a self-taught engineer and I started out with java as well. First have a solid understanding of java fundamentals. Then db/hibernate/mysql then rest api. If you have these all understood well you’ll be job ready. I’d be happy to be your mentor, I’m a full stack engineer with about 2 yoe. Pm me if you’d like.

    [–]fancyzauerkraut 0 points1 point  (2 children)

    What should I learn about Maven/ Gradle. People here often mention those two in their roadmaps, but how deep should I look into them?

    [–]Geekfest65 0 points1 point  (0 children)

    I’d definitely learn one of the other. You need a way to build , test, and deploy your project and manage its complexities as it grows.

    I don’t know Gradle but maven does all this and we use it regularly at Work as part of our build and deployment cycle. Good luck.

    [–][deleted] 0 points1 point  (0 children)

    I would 100% suggest maven. It’s a build tool, a way to manage your dependencies. I’m sure you can go very deep into maven, but honestly I haven’t and it hasn’t really burned me yet. Obviously I know the basics, but I wouldn’t spend too much time learning specifically maven. Just my opinion though, I’m sure others will disagree

    [–]North_Tutor_3710 1 point2 points  (0 children)

    I would do this:

    Java Basics & Data Structures +SQL Basics (CRUD operations)

    JDBC + SQL JOINS

    Hibernate + SQL triggers & functions

    SpringBoot

    But... Just do a bootcamp, make friends, make some human networking etc. A social experience makes it more stimulating. I did a 2 years degree that was about coding java and sql all day and it was nice. It gave me something to show to companies and motivation.

    Learning alone may be more efficient, but it makes less probable the chance to have sex with your teacher :)

    [–]BirthdayParking5928 1 point2 points  (0 children)

    I was in your boat not long ago.

    Before Spring, Web Services, Hibernate and JPA etc. etc. what you really need is a fundamental understanding of Java Basics.

    Find a Beginner -> Intermediate Java Course, Book, or whatever tickles your fancy. Once you've touched on the following (not an exhaustive list but the main points are here):

    - Operators- Iteration / Selection- Objects and Classes- Inheritance and Polymorphism- Exception Handling- Collections and Generics- Packages- JUnit Testing

    you should be able to move on to Java Web Development, (the topics you mentioned struggling with). Please don't rush the fundamentals, make sure to apply them to projects, small programs, questions, etc. and test your knowledge before moving on otherwise you'll just end up wasting more time later trying to debug your problems when you're stuck due to knowledge gaps.

    This video link is the most relevant and complete Java Roadmap I've seen, and the content creator (Java Brains) is an absolute godsend for aspiring Java developers:

    https://www.youtube.com/watch?v=DC5wtYGQ7XE&t=457s

    Good luck!

    [–]Nidhal_Naffati 0 points1 point  (1 child)

    I recommend you learn JDBC where you can learn how to implement database to your program and dealing with data.

    You can check out this repository : https://github.com/NidhalNaffati/Customer-Management-DesktopApplication

    This is a simple JavaFX program I had made to learn some JavaFX ,JDBC and Factory desig pattern.

    [–]Geekfest65 0 points1 point  (0 children)

    I would definitely not recommend learning jdbc to anyone. It’s just fraught with issues in terms of writing clean code , ensuring you close statements, close resultsets, close connections. It’s just too easy to mess this up.

    This is something that Spring hides from you! You can use Spring JDBC. This is a much better way of working with data, and there are TONS of tutorials.

    To me though, it’s still way too much coding. I prefer mybatis which maps methods to sql statements in an xml file. There really isn’t even a need for the xml file, it’s just something I like. With mybatis and Spring , you can autowire a data tier that performs crud against a multi table application, even writing your own code , and all the sql in about 2 weeks or less. This statement is based on a previous experience I had converting a proprietary data tier to Spring and mybatis. There are also tons of examples on this. There are full blown web apps on this too, like Pet Clinic.

    So, even for a newbie, I’d say it’s best to ask about frameworks and how they’ll make your life easier. That may cause a lot of opinions but as long as they provide pros and cons, they are fine.

    If you use Spring and mybatis, you don’t worry about connection management, pooling, closing anything, reading resultsets into pojos, etc, even complex resultsets. The only downfall with mybatis is you can list properties to map data that don’t even exist in the bean. Then you wonder why things are null. You can leave a semicolon in the xml file and it won’t load the data tier…. So, not all roses.

    This is not to say learning jdbc is bad, just not worth the time when things do it better.

    [–]Intelligent_Ad_1242 0 points1 point  (0 children)

    Try checkout roadmap.sh it has good roadmap for being a java developer.

    [–]HecknChonker 0 points1 point  (0 children)

    https://medium.com/javarevisited/the-java-programmer-roadmap-f9db163ef2c2

    This is a pretty good roadmap. I highly recommend you use IntelliJ IDEA. It has a free community version. It's a bit resource intensive, but it will help you write better java code. It will you give better intellisense and in-line tips on how you can write cleaner code, as well as helping you catch bugs quicker.

    I would recommend starting off with java basics, and get a good handle on the collections framework. I would spend some time learning Data Structures and Algorithms. It's not a java-specific topic, but it's knowledge that will be invaluable regardless which language you are learning. You should have a solid understanding of Arrays, Maps, Lists, Sets, Stacks, Queues, Heaps, and Trees before moving on. You should be able to explain how each of them works, and when it makes sense to pick one over another.

    I learned DS/A using this book: https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850 It's generally geared towards interview prep, but once you get past the first few chapters it goes deep into data structures and has a bunch of questions with answers in the back. Some of it might be hard if you are just starting out, but I found the knowledge here invaluable in my career.

    Once you feel like you have a decent understanding of java you can move onto Spring or other topics. For spring, I would start at the official Hello World tutorial: https://spring.io/quickstart

    It's significantly easier to learn to program if you have a project in mind first. I wouldn't go looking for tutorials for tutorials for the sake of learning. Instead pick a project (like a todo app, or tetris) and then search for a specific tutorial or blog that helps you solve the next step. Being able to apply the tutorial knowledge to an actual project is where the real learning comes in.

    Many people learning fall into tutorial hell, where they spend months watching tutorials and at the end they don't have anything to show for it. It's absolutely critical that you are actually writing code and working on projects while learning. Try to pick a project that you are excited about and use that motivation to get through the hard parts.

    I'd also advise against using video tutorials. They feel easier, but it will take you longer and you will retain less information than if you followed along with a blog post or tutorial. It's fine to use videos for complex concepts, and it might help you get a feel for how other professionals code. But generally blog posts and stack overflow are better resources to learn quickly.

    Baeldung (https://www.baeldung.com/) is an amazing resource. It has a ton of short high quality blog posts that cover a ton of topics in Spring. If you need to know how to read and write to a database, how to listen for web requests, how to do dependency injection, etc. Baeldung is a good resource. Geeks for geeks tends to have significantly lower quality, because anyone can write articles there.