r/learnjava • u/AliveShine • May 07 '20
Good Object Oriented Code
Hi
Can anyone share a link of a github repo where I can read good object oriented code. Not looking for java library code (as they are huge and difficult to dissect) but rather a smaller project/app with some domain. I tried searching but didn't find anything good. Found some basic projects.
Or can anyone suggest me a book or course where you learn it by doing. Trying to get better at OOD and implementation. I have read a lot of theory but want to look at real world examples.
TIA
5
u/iamsooldithurts May 08 '20
Clean Code by Robert Martin.
1
u/AliveShine May 08 '20
Thanks. I'll check the book out. Are there real world examples in book? What I mean is an app being developed and not just specific code snippets.
3
u/calmonad May 08 '20
I think Uncle Bob often referenced a project he worked on called FitNesse. https://github.com/unclebob/fitnesse
1
1
u/AliveShine May 08 '20
Thanks. I'll check this out.
1
u/actuallyrarer May 08 '20
If you understand the S.O.L.I.D principles, read clean Code and read Design Patterns, youll be a quality software engineer better than most haha.
I think the best code i have seen is frustratingly simple. Like "how did you write that so simply" kind of simple. Its really an art form and im jealous of anyone who can do it well.
Srsly check out design patterns though.
1
u/AliveShine May 08 '20
I agree. Understanding SOLID principles, Design Patterns and using them effectively is what best engineers out there do. And it is not very easy. And you're right that some people do write code which is very simple and effective. I am just trying to understand how/what are their mental models. It really is an art.
1
1
u/swearobics May 08 '20
Hey, I was googling this recently and also came across the clean coder, another book by the same guy which came out later. Have you read that too? Is there an order you'd read them in?
1
u/iamsooldithurts May 08 '20
I havenāt read that one. I got the most recent edition of Clean Code I could find. My buddy has my copy but I think it was just a few years old or so.
5
u/rochakgupta May 08 '20
You can checkout the following open source projects which have very good OOP in Java - Elasticsearch, Google Guava, Spring Projects, Apache Projects - Like Kafka
2
u/AliveShine May 08 '20
Thanks man. But all these tools/libraries solve technical problems. What I was really looking for is more around business domain.
2
u/rochakgupta May 08 '20
Should that matter if the project is relatively well built and used?
2
u/AliveShine May 08 '20
The problem is all these projects are huge and I feel overwhelmed when I look at the code. I want to start small and then jump on these projects.
1
u/TheNarfanator May 08 '20
I think that's what OP's requesting for too, at some level.
Well maybe I'm projecting myself on him.
3
2
u/a7x21tayler May 08 '20
Hyperskill offers a bunch of projects for java and it teaches you the required skills for each stage of the project. Itās the best ālearn by doingā site Iāve found. The projects are sorted by beginner, intermediate, and nightmare. If I was to go back to when I was learning java, Iād definitely choose this website.
1
2
1
u/ha_ku_na May 08 '20
Hey, one of the core differences I find between open source software and commercial software development is that you own and deal with data in the latter while the former ones are just tools whose state doesn't change with time(hence no dealing with database or users like in a business POV). So, a lot of what we might actually want to learn from OOP, like- applying design patterns to make software that can evolve as business evolves, or how design patterns fit in with frameworks like spring- can't be learnt by following open source software. Let me know if you agree/disagree and why!
3
u/AliveShine May 08 '20
I agree with you totally. Tools and libraries serve a very specific purpose. They might be object oriented in nature but what I was looking for is a business problem and how to make it good in OO way. Since commercial apps are generally closed source it is very difficult to find sources to refer. I looked around at a lot of places but couldn't find a good example.
1
u/Sai_Upadhyayula May 08 '20
As you said you are also interested in course, you can have a look at Pluralsight's courses "Making your code more Object Oriented" and "Master Object Oriented Programming" by Zoran Horvat. You need to have a subscription to access these courses.
The examples are concise and revolve around business use case like Bank Transactions. I liked the course and learnt a lot.
1
1
2
1
u/stschoberg May 08 '20
Take a look at some popular open source projects. Look for Java or other enterprise OO languages.
3
45
u/gerardta May 07 '20
I can make a video series on this if you'd find that helpful.