SOLID Design Principles with Java Examples | Clean Code and Best Practices | Geekific

  Рет қаралды 65,479

Geekific

Geekific

Күн бұрын

Support us on Patreon: / geekific
GitHub Repository: github.com/geekific-official/...
Stay updated on our videos by subscribing to the channel and hitting the like button!
Clean and quality code isn’t only a code that works, a code that provides us with the desired output or result. A high-quality code is a reliable, maintainable code; it is a testable, reusable code. Over the years, many standards, principles and best practices where introduced and theorized in attempt to establish the building blocks of object-oriented design. In this video, we cover, by example, five principles known as the SOLID principles. These principles revolutionized the world of object-oriented programming, because when combined together, they encourage the developer to create a more maintainable and flexible software.
Timestamps:
00:00 Introduction
00:51 Single Responsibility Principle
03:26 Open Closed Principle
05:52 Liskov Substitution Principle
07:42 Interface Segregation Principle
09:16 Dependency Inversion Principle
10:37 Thanks for Watching!
If you found this video helpful, check other Geekific uploads:
- Abstract Data Types vs. Data Structures: • Abstract Data Types vs...
- Generics and Wildcards in Java Made Simple: • Generics and Wildcards...
- Object-Oriented Programming Fundamentals: • What is Object-Oriente...
- Introduction to Databases - The Fundamentals: • What is a Database? | ...
- New Features in Java 17: • New Features in Java 1...
#Geekific #SOLID #SolidPrinciples #BestPractices #CleanCode

Пікірлер: 58
@stphdr2771
@stphdr2771 3 ай бұрын
First time as a student that I completly understand SOLID principles ! Thanks for the share.
@luisalamo2658
@luisalamo2658 4 ай бұрын
Perfectly explained in 11 minutes! Thanks!
@ppdmartell
@ppdmartell Жыл бұрын
Best video I have ever seen on SOLID design principles!
@tassivisognon2247
@tassivisognon2247 Жыл бұрын
best and straightforward video I have watched on this topic. Thanks you
@jasper5016
@jasper5016 Жыл бұрын
Your videos clear all my doubts. Thanks
@Jody-nf2bz
@Jody-nf2bz 5 ай бұрын
Really excellent! Thank you!
@jimmytorres4181
@jimmytorres4181 2 жыл бұрын
This video is amazing. Your channel is underrated, you're great at teaching
@geekific
@geekific 2 жыл бұрын
Thank you so much :) I really appreciate it!
@lavankumargudipudi5926
@lavankumargudipudi5926 4 ай бұрын
Very well explained..❤
@Nazaro4ka
@Nazaro4ka Жыл бұрын
Very useful video, great job!
@cba2944
@cba2944 Жыл бұрын
Underrated great explanation
@christianrodier3381
@christianrodier3381 2 ай бұрын
Super helpful
@elyakimlev
@elyakimlev 2 жыл бұрын
Interesting and informative. I've used enums many times in my code, but now I see using an interface with classes implementing it would have been a better choice in many situations. I would just change one thing in the Liskov Substitution Principle example: Seeing specific Video member variables like title, likes and views under a class named VideoManager seems wrong to me. Instead, I would have left these member variables under the Video class and move the playRandomAd() method to VideoManager. PremiumVideo would still inherit from Video. That way, you also remove the need to duplicate the getNumbersOfHoursPlayed() in every subclass.
@geekific
@geekific 2 жыл бұрын
Thank you :) Yup, well done! Why not, that is another way of doing it! This video is about the 'what' and not the 'how', we are just demonstrating what these principles are, feel free to implement them however you see fit!
@KokoShampiona
@KokoShampiona Жыл бұрын
And what will happened if I then invoke new PremiumVideo.playRandomAd() - the method of the base class?
@t0khyo
@t0khyo Жыл бұрын
The most underrated channel ever!
@thundley2039
@thundley2039 3 ай бұрын
perfectly explained
@user-pd6vy7my2f
@user-pd6vy7my2f 2 ай бұрын
Thank you❤
@imranyaseen3528
@imranyaseen3528 2 жыл бұрын
This is an amazing video. Very easy to understand with examples. Please keep it up!
@geekific
@geekific 2 жыл бұрын
Glad you liked it! More incoming... Stay Tuned :)
@lpandp90
@lpandp90 7 ай бұрын
Agreed!! First time I really get all principles after a decade
@sajisajisam6827
@sajisajisam6827 2 жыл бұрын
Great video with great examples and explanation!
@geekific
@geekific 2 жыл бұрын
Thank you :) Glad you liked it!
@francksgenlecroyant
@francksgenlecroyant Жыл бұрын
Super incredible, I enjoyed every single second
@geekific
@geekific Жыл бұрын
Glad you enjoyed it! Happy to help :)
@mohamedrizk9361
@mohamedrizk9361 Жыл бұрын
Thanks sir, it's very clear
@Rob-J-BJJ
@Rob-J-BJJ 7 ай бұрын
wow this video was beautifully made.
@mart-b5610
@mart-b5610 3 жыл бұрын
Absoloutly superb explanation! Thanx!!!
@geekific
@geekific 3 жыл бұрын
Glad it was helpful! You're welcome :)
@Manuel-fp6ni
@Manuel-fp6ni 14 күн бұрын
In Liskov's substitution is same to say: replace the child by its father or replace the father by its child? I see both ideas explaining this principle on the web
@darkstudio3170
@darkstudio3170 Жыл бұрын
Underrated channel . Like and shared. Thanks a lot for the efforts🙏
@geekific
@geekific Жыл бұрын
Thanks for the support :)
@pog_champ
@pog_champ Жыл бұрын
very well made video!
@ebuzertahakanat
@ebuzertahakanat 6 ай бұрын
good refresher
@yobrangutez1470
@yobrangutez1470 Жыл бұрын
You are God sent. Great content. Kindly recommend other channels that teach the way you do.
@geekific
@geekific Жыл бұрын
Thank you! Glad to be of help :) There are no specific channels, I just try to see as many references as I can before making a video to add on top of the stuff I already know.
@KizilBoss
@KizilBoss 8 ай бұрын
thank you, I am always struggling with that in high level applications. The part with Dependency Inversion Principle helped me alot, well can you do a example with best practices lets say with have 5 moduls?
@geekific
@geekific 8 ай бұрын
Glad it did! Will add it to my list of upcoming video, stay tuned!
@vextronx
@vextronx Жыл бұрын
These videos are extremely helpful, they deserve much more views. You are amazing! One question, doesn't the VideoManager class (at 7:16) violate the Single Responsibility Principle? I'm really not sure, it just seems a little strange. Does "managing a video" count as a single responsibility? Isn't that a bit too broad?
@geekific
@geekific Жыл бұрын
Thanks a lot! Since we are focusing in each part on one single principle and diving in its details, it won't be the cleanest way to actually solve the problem, but we can't explain them independently without doing that! So, yes, feel free to tear it apart and implement multiple specific interfaces :)
@vextronx
@vextronx Жыл бұрын
@@geekific Thank you for the answer! :)
@jsimek
@jsimek 3 ай бұрын
I am reading Clean Code and one thing I noticed is that Robert C. Martin recommends to avoid words like manager, processor, data or info in the names of a class, i.e. VideoManager at 7:14
@jsimek
@jsimek 3 ай бұрын
but to be honest I have no idea what else to name it in this case
@doomguy1496
@doomguy1496 Жыл бұрын
Very nice tutorial. Have a question tho regarding L. You will not be able to have a single collection of all videos now, or am I missing something here ?
@geekific
@geekific Жыл бұрын
Thanks! In this example yes, because we are focusing on one principle at one point in time. However, you should strive on keeping all of them in check, so the best practice would be to have specific interfaces implemented by the videos and use these instead.
@beep6091
@beep6091 5 ай бұрын
i am d'accord@@geekific
@aznstride4325
@aznstride4325 Жыл бұрын
For the open closed principle how would you avoid rewriting the driver code that instantiates all the classes that follows the open close principle?
@geekific
@geekific Жыл бұрын
It depends on your use-case. You may not need all of them (strategy-like) and if you do you can probably put them in a factory.
@vinayakgandhi5690
@vinayakgandhi5690 11 ай бұрын
isn't the Liskov substitution principle the opposite of what shown in the video? i.e. Base type should be replaceable by the sub type?
@Lucretat
@Lucretat 10 ай бұрын
@@geekific OP is right, the text needs fixing, you got it the other way around. ;)
@PrasannaCE
@PrasannaCE 5 ай бұрын
LSP is not updated yet with example Base type replace by sub type...
@aldoumene6201
@aldoumene6201 Жыл бұрын
Does the Liskov principle always mean applying composition?
@geekific
@geekific Жыл бұрын
The principles state what the problem is but not the solution. So, you can use whatever means necessary to resolve them. Sometimes, creating specific interfaces could resolve this issue. In this video, we tried to explore different way to do that as much as possible! Cheers!
@aldoumene6201
@aldoumene6201 Жыл бұрын
Thanks a lot for the fast reply also Happy new year to you bro!
@jasper5016
@jasper5016 Жыл бұрын
Is it possible for your to show us how to write clean or secure Java Springboot code? especially leveraging design patterns.
@geekific
@geekific Жыл бұрын
Of course, and it is actually in the making, will be uploaded in the SpringBoot playlist, don't have an exact timeline, but it will! Stay Tuned!
@beep6091
@beep6091 5 ай бұрын
thanks you@@geekific
@1CProgrammer
@1CProgrammer 10 ай бұрын
😂😭😁🤝
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 263 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 14 МЛН
1❤️
00:17
Nonomen ノノメン
Рет қаралды 13 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!
19:09
ArjanCodes
Рет қаралды 286 М.
SOLID Design Principles in java with Example | JavaTechie
34:44
Java Techie
Рет қаралды 177 М.
Solid Programming - No Thanks
32:00
ThePrimeTime
Рет қаралды 246 М.
Liskov's Substitution Principle | SOLID Design Principles (ep 1 part 1)
16:08
Christopher Okhravi
Рет қаралды 157 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,6 МЛН
React Clean Code: Advanced Examples of SOLID Principles
28:03
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 228 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 14 МЛН