No BS SOLID Principles

  Рет қаралды 2,923

Gary Clarke

Gary Clarke

Күн бұрын

Пікірлер
@bpdkuikel
@bpdkuikel 8 ай бұрын
I must thank you for your amazing efforts in taking PHP to general people and creating lots of awareness. 🎉🎉🎉
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
Love the kind words!
@jorditrigo9569
@jorditrigo9569 8 ай бұрын
Many thanks for sharing your knowledge, Gary!
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
My pleasure! Thanks for watching!
@Kogemate
@Kogemate 8 ай бұрын
Great video!!! Everybody who want more durable code should understand these concept.
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
Thanks very much!
@commanderbensisko
@commanderbensisko 8 ай бұрын
Hi Gary. I'm just curious why you didn't make SmsDispatcher and Mailer inherit from Notifier and then use a type of Notifier in your code ?
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
A Notifier interface or abstract Notifier class would be the best solution but I didn't want to start delving into dependency inversion in the SRP example...it might have become a distraction.
@astev52
@astev52 8 ай бұрын
Love your work!
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
Glad you enjoy it!
@dandan-js2ir
@dandan-js2ir 6 ай бұрын
Hi. Great video! One question though regarding Open/Close principle. How to deal with vendor/ directory classes that does not implement an interface? Let's say there is a x package in vendor directory, and that package has a regular class that performs some task (without implementing any interface nor extending an abstract class). How to add Decorator pattern in such case? Thank you and cheers!
@GaryClarkeTech
@GaryClarkeTech 6 ай бұрын
That gets a bit more complex. If you need its functionality you can inject it as a dependency into your own class which does implement the interface. But try to avoid putting square pegs in round holes if it's going to cause more problems than it solves.
@dandan-js2ir
@dandan-js2ir 6 ай бұрын
@@GaryClarkeTech Thank you for response!
@ta-mas
@ta-mas 7 ай бұрын
Hello Gary, Great video, it was really really helpful! At the ISP part, let's say not just the archiver needs to read the file to do an operation on it. How should I handle that? Maybe break the interface into even smaller parts, so I have a FileReaderInterface a FileArchiverInterface and an Interface for my other operation that I want to imeplement? Thank you for the amazing content!!
@GaryClarkeTech
@GaryClarkeTech 7 ай бұрын
Cheers for the kind words... Yes just break it up and implement as many interfaces as you need
@thenightwolf224
@thenightwolf224 8 ай бұрын
Amazing Video Buddy Keep Going ❤🔥
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
Thanks a lot...appreaciated!
@Kogemate
@Kogemate 8 ай бұрын
For the first example, instead of encapsulation, I would use an interface. And only if the class that I am trying to inject does not implements the interface (like an open source class), I would create this class. Actually, it is a classic design pattern. Globally, it is better to rely on interface which is better than abstraction which is better than concrete class. :)
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
You're right..but I didn't want to delve into dependency inversion before I got to it..it might have become a distraction.
@Kogemate
@Kogemate 8 ай бұрын
@@GaryClarkeTech You were actually right not to do it, too much complexity for nothing. BTW, I learned everything about these concept from Miško Hevery (he was Mr Writing-testable-code evangelist at Google). If you google his name, you will find amazing pdfs and yt videos. Lots of tips. As it is a little old, we can see what aged well (almost everything). Take care.
@BarMineL
@BarMineL 8 ай бұрын
This is what I need
@kokokodev
@kokokodev 3 ай бұрын
Coooll❤❤
REST API basics with the API Guy @JustSteveKing
1:41:54
Gary Clarke
Рет қаралды 2,2 М.
Make Your Code Clean With the SOLID Principles
18:24
Philipp Lackner
Рет қаралды 102 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 282 М.
Domain-Driven Design: The Last Explanation You'll Ever Need
21:05
Software Developer Diaries
Рет қаралды 15 М.
No BS SOLID Principles: Dependency Inversion Principle
12:40
Gary Clarke
Рет қаралды 746
SOLID Principles in Laravel: 5 Examples (+ New Course!)
21:07
Laravel Daily
Рет қаралды 75 М.
Intro to Data Oriented Design for Games
52:35
Nic Barker
Рет қаралды 37 М.
Become a bash scripting pro - full course
36:00
CODE IS EVERYTHING
Рет қаралды 73 М.
SOLID Design Principles in #Angular (Advanced, 2021)
41:49
Decoded Frontend
Рет қаралды 151 М.
C# 6 Draft Spec Reading
1:22:46
Jon Skeet
Рет қаралды 19 М.
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 262 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН