r/learnjava • u/involvedwithitall • Sep 27 '21
Example Of A Java Program From A Working Developer?
I am working to solidify my foundation in programming with java currently and am very interested in studying what a professionally coded java program looks like. It doesn't matter what field or even if it's a big project involving other languages. I'm just trying to gain a better understanding of coding convention in the workforce. Does anyone know of any resource for this?
24
u/TotalBismuth Sep 27 '21
For enterprise applications, it's very layered. You have the Controller layer, the Service layer, and the DAO layer to name a few. Heavy use of interfaces and REST APIs. Enterprise applications are usually built on a framework (eg. Spring), whether it's Java or any other language. Dependencies are managed with something like Maven. Applications are run on multiple servers using a load balancer to improve performance.
37
u/VenerableGeek Sep 27 '21
In a word, Github
0
Sep 27 '21
[deleted]
6
u/bravesoul_s Sep 27 '21 edited Sep 28 '21
I tried to upvote you like 15 times, I will get back to you with my free reward sometime. I was looking for production like Spring Boot repos not sure how I'm not figured out this way but thank you
9
Sep 27 '21
What kind of program? Java is used in a lot of different domains and how you code Java depends on what you're doing.
There's the Spring Pet Clinic, if you want to see how a typical Spring application is designed.
4
u/steave435 Sep 28 '21
Unless they're working on an open source project, they're not allowed to show it to you (otherwise it'd be an open source project). The best place to find those would be on github, like others mentioned.
2
u/desrtfx Sep 27 '21
Java itself is one good Java application and strictly adheres to Oracle's (of course) code conventions.
2
u/yel50 Sep 30 '21
this is an amazingly accurate example of what professional Java code tends to look like.
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
6
u/knoam Sep 27 '21
https://google.github.io/styleguide/javaguide.html