r/javahelp • • Jan 06 '21

Algorithm in Java Spring

I am Java self-taught, I just learned algorithms and spring framework. I want to master web programming using Java. I am still a student, I have never participated in real projects so I have many questions I want to be answered. I would be more than happy to receive an answer from someone.

-In Java Spring practical projects, algorithms such as recursion, backtracking, BFS, DFS, binary tree search, etc are used and used a lot? When Spring Data JPA has a search function, are search algorithms such as binary tree search, BFS, DFS, etc important and used?

- Between the algorithm and the framework, which one should I learn more deeply?

Hope someone will answer these of my problems. Thanks very much

21 Upvotes

11 comments sorted by

View all comments

8

u/LiteratureStriking Jan 06 '21 edited Jan 06 '21

Honestly, with basic web apps and most business apps, they are not going to be algorithm heavy. You'll be using libraries that implement the algorithms. This is true unless you are going into a very specialized field, such as machine learning or data analytics. It's good to have background knowledge though, because the need might turn up every now and again.

While framework knowledge is good, more practical knowledge would be architecture, testing and tuning. You don't want to let the framework do the thinking for you and you don't want to become a slave to the framework.

  • Learn how to structure apps so that they are easy to maintain and test. (for example: Clean Architecture, SOLID).

  • Learn testing techniques, to ensure code quality and ease of maintenance (for example Test Driven Development).

  • Learn code tuning so you can get an instinct for what is not a good idea to do (for example, not writing horrible SQL or the dreaded N + 1 SELECT problem), while at the same time knowing when the code is good enough vs. when you need to write more sophisticated code to improve performance (premature optimization is the root of all evil).

  • Also, some basic code quality skills is good, especially when working on a team (code formatting, when and how to comment, etc.) (see Clean Code).

1

u/my5cent Jan 06 '21

Thanks. Good to know that there are other options.