PHP Interfaces & Polymorphism - Interfaces Explained - Full PHP 8 Tutorial

  Рет қаралды 36,071

Program With Gio

Program With Gio

Күн бұрын

Пікірлер: 190
@ronniefaithparalejas7678
@ronniefaithparalejas7678 2 жыл бұрын
Am i the only one who notice these videos are better than any PHP premium or paid tutorial videos out there? Thanks for these great videos!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙏💙
@DAG_r8
@DAG_r8 2 жыл бұрын
One thing for sure it is always concise and precise, I would recommend this to many php developer, we are all apprentice.
@KIKOmanasijev
@KIKOmanasijev 2 жыл бұрын
Yep, I have bought many courses and none of the matches the quality of Gio's content. Still can't believe this is free and Gio doesn't have more engagement on this channel 🤯
@Cronay
@Cronay Жыл бұрын
100% true. So many tutors bring their character and with that unnecessary fluff into their content. Gio is different. It's just straight and dense knowledge and has just the right amount of his personal opinion in the video(barely any).
@paul.bitoana
@paul.bitoana Жыл бұрын
I just canceled the subscription because of these videos.
@JohnnyBigodes
@JohnnyBigodes 3 жыл бұрын
That independent debt collector made my day ;). It is again a great video... Thank you
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
:D thank you, happy to hear that
@JoseManuelCornelio
@JoseManuelCornelio Жыл бұрын
These videos are so dense that I really have to take some time to digest the content before moving on to the next one. This is better than any paid course out there so far.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you, appreciate it 🙏. Taking some time & digesting it before moving on is proper way to consume content & learn. Binge watching doesn't work for a lot, may work for some but for me personally never worked, if I binge watch a course I forget it very fast, so I like to take my time with each episode when learning something new
@federicobau8651
@federicobau8651 3 жыл бұрын
Best php oop with interfaces and polymorphism tutorial, bettern than paid bootcamps
@wesammohammed1819
@wesammohammed1819 16 күн бұрын
"Your guidance means a lot, my teacher Gio. Thank you for helping me grow every day!"
@ProgramWithGio
@ProgramWithGio 15 күн бұрын
You're welcome
@codedigitally9236
@codedigitally9236 2 жыл бұрын
The way instructor has describe the OOPS concepts with realtime examples and cases is really awesome.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad it was helpful, thank you 💙
@neozes
@neozes Жыл бұрын
Dude! This was amazing! The fact, that you have covered the topic from all angels was just spectacular. I just came here from another video, that just explained how to implement interfaces, without any context, especially... what damn problem is this utility solving. Thank you!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
That's great to hear, thank you 🙌
@dajanradovic5341
@dajanradovic5341 2 жыл бұрын
great teacher, great examples and way of teaching. thank you for clearing up all these concepts
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙌
@affordablecustomehr4845
@affordablecustomehr4845 4 ай бұрын
After watching this video many times, I have finally got an opportunity to use it in one of my projects. I recognized the situation I was about to go into needed an interface to keep the system flexible for the future. I needed to build multiple types of XML requests. Using and interface, I only need one gateway class to pass the different XML request to. Thanks Gio!!
@ProgramWithGio
@ProgramWithGio 4 ай бұрын
Awesome, that's great that you were able to apply this to a real world scenario. Good job
@emredikmen276
@emredikmen276 5 ай бұрын
you are the best at explaining , thanks Gio
@ProgramWithGio
@ProgramWithGio 4 ай бұрын
Thank you 💙
@mwaas
@mwaas Жыл бұрын
Aside from php, anyone who wants to understand oop should watch this section of the course more than great
@ProgramWithGio
@ProgramWithGio Жыл бұрын
💙💙
@sergeisurin2963
@sergeisurin2963 Жыл бұрын
A really good course, one that doesn't just go over the basics, what I've always hoped to see.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you, happy to hear that
@sergeisurin2963
@sergeisurin2963 Жыл бұрын
@@ProgramWithGio No, thank you! 👍
@asadmughal469
@asadmughal469 3 ай бұрын
i was always confused about polymorphism that how will it take place and why the hell we needed this to be added in oop basics and today rocky rocked on my polymorphism concept.
@ProgramWithGio
@ProgramWithGio 3 ай бұрын
Rocky is the best
@leoortega5420
@leoortega5420 Жыл бұрын
You explained interfaces and their use-cases better than my university professor.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
hehe, happy to hear it was helpful, thank you
@OmarFaruk-ku9fv
@OmarFaruk-ku9fv 11 ай бұрын
You just cleared my doubts and concepts of these topics , which i spent a lot of time searching . Your videos are to the point , with a lot necessary information and with examples . This blew my mind . Kudos to you .
@ProgramWithGio
@ProgramWithGio 10 ай бұрын
Glad it was helpful, thank you
@techatival
@techatival 3 жыл бұрын
Really liked the polymorphism example. Thank you!
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
You're welcome. Glad you liked it 👍
@Zubbee
@Zubbee 2 жыл бұрын
This is another mind opening lesson in my quest to learn PHP. I also think this is the lesson that is now compelling me to go back and look at some of the earlier OOP lessons to really link terms and concepts better. It has certainly started feeling like I'm taking a course in the University. Thanks Gio
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad to hear that, thank you
@parinataneja7099
@parinataneja7099 2 жыл бұрын
Another AWESOME tutorial. Thank you for elaborating all these concepts :)
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙌
@Vitalii-m6r
@Vitalii-m6r Жыл бұрын
It's a very clear explanation. Thanks for this lesson again.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Glad you liked it
@CarolinaQVargas
@CarolinaQVargas Жыл бұрын
GREAT EXPLANATION! Thank you so much!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're very welcome
@Zubbee
@Zubbee 2 жыл бұрын
Done re-watching. Moving on. Thanks Gio.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Awesome 👍
@David92031
@David92031 Жыл бұрын
10/10 channel my dude you are awesome
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you
@jaywaldluna3158
@jaywaldluna3158 2 жыл бұрын
Very informative video. Good job for the sample analogy. Keep uploading like this tutorial
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad you liked it, thank you 💙
@Armando-px8hi
@Armando-px8hi Жыл бұрын
Thanks for this interface explanation. It is the best!!!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Glad you like it, you're welcome
@karam0101
@karam0101 2 жыл бұрын
Another great tutorial. Thank you for sharing all these concepts
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
You're welcome & thank you 💙
@GillesBeaulacJoe
@GillesBeaulacJoe 2 жыл бұрын
Thanks!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 💙
@ינוןאלבז-כ1ז
@ינוןאלבז-כ1ז 2 жыл бұрын
Wow! Perfect explanation!!!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙏
@siyahkedilucifer
@siyahkedilucifer Жыл бұрын
So if a class implement an interface that must implement all methods in the related interface. In the another hand, at 15:20, an abstract class implemented an interface but didn't implement the render method in Renderable interface. So abstract classes are exempted from that rule? Thank you so much for lecture.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Abstract classes don't need to implement it, underlying class that extends that abstract class will have to implement it. If you implement it withim abstract class then child classes don't need to implement it. You can't instantiate an abstract class directly.
@siyahkedilucifer
@siyahkedilucifer Жыл бұрын
@@ProgramWithGio thanks for this precious info.
@d_sportello
@d_sportello 2 жыл бұрын
Thanks man, really helpful
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
You're welcome 💙
@tolebiGamingTime
@tolebiGamingTime 3 ай бұрын
Cool course, I'm waiting for the video lesson on microservices)
@ProgramWithGio
@ProgramWithGio 3 ай бұрын
Thank you
@Haamome
@Haamome 2 жыл бұрын
you are the best at explaining. I really like your tutorial.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you so much.
@donmikele07
@donmikele07 Жыл бұрын
I think I've already said but I'll repeat: you are the guru for programming. Masterpeace! I"m 2 years in software engineering and I would like to hear your opinion about learning design patterns in OOP: creational, structural, behavioral. How important they are?
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you. Design patterns are important but it depends on project & requirements. For some projects you may never use any design patterns. For some you may already be using design patterns without knowing it or without having the fancy name for it. Many devs try to stick design patterns in places where they don't belong, just because they want to use the cool new design pattern they read about someone's blog. I would advise to not do that because I've done that & its not good in the long run. Best thing to do is to understand your requirements & project fully and see what problems you need to solve.
@donmikele07
@donmikele07 Жыл бұрын
@@ProgramWithGio Thank you so much! This means a lot to me.
@udayan285
@udayan285 Жыл бұрын
Thank you Gio.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@tahmidziko
@tahmidziko 4 ай бұрын
your video is just awesome. a lot of things i learned from you. i owe you. on thing i want to add in php 8.1 there is may be a new feature default methods in interface . (if i am not wrong )
@ProgramWithGio
@ProgramWithGio 4 ай бұрын
That RFC didnt pass I think if its what you mean (default methods). Maybe you meant constants?
@emekatimothyiloba699
@emekatimothyiloba699 Жыл бұрын
Thank you Gio
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@romankiashko5435
@romankiashko5435 Жыл бұрын
What to say except - Bravo!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you 🙌
@samahgad241
@samahgad241 Жыл бұрын
Is it expected that the video takes hours for me to understand it? Thank you very much. You have a fantastic way of explaining
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Everyone learns at different pace, so yes it's normal. Just be consistent and practice 👍
@samahgad241
@samahgad241 Жыл бұрын
@@ProgramWithGio thanks for your support, I wish you a nice day. 💐🙏
@vkmishra.singer
@vkmishra.singer 2 жыл бұрын
Best !!!! I hope you to create other courses in the future.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙏
@HakanGalip
@HakanGalip 2 ай бұрын
Thank's a lo very good and understandable...
@ProgramWithGio
@ProgramWithGio 2 ай бұрын
Glad you like it 👍
@RedZambala
@RedZambala Жыл бұрын
around 8:59 it sort-of works, but on some random numbers I 'm getting Warnings: Deprecated: Implicit conversion from float 368.5 to int loses precision in \CollectionAgency.php on line 15 Collected $545 out of $737
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You are probably on PHP 8.1, during this video we used 8.0 I think, we upgrade to 8.1 later in the series. You can read more info on that here php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string It will trigger warnings when float is implicitly converted to int, so you need to add casting (int) or make sure you pass/use integer
@rxxt-sh1vj
@rxxt-sh1vj 2 жыл бұрын
Bro at 5:25 you said constants Defined in intefaces cannot be overridden by the concrete class that implements that interface but in PHP 8.1.0 we can override the constants...just in case someone tries that out on a Newer Version....:D Loving your videos watching them one by one...Your PHP course is the best one on internet....Even a paid course on UDEMY cannot match the concept and effort you have put in your videos...:D
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Yea this lesson was using 8.0. There is a note about it in the description. Thank you 🙌💙
@rxxt-sh1vj
@rxxt-sh1vj 2 жыл бұрын
@@ProgramWithGio You dont miss even a single thing...:D
@kajo2546
@kajo2546 2 жыл бұрын
Hey, I have a question. In the video you said that constant defined in the interface can not be overwritten in the class however I am able to do that. Did something change ? Inteface: public const MY_CONSTANT = 1; some Class: public const MY_CONSTANT = 2; or whatever other value This does not throw an error for me.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Yes in php 8.1 it is allowed now, prior to 8.1 it resulted in error. When this video was shot we were using php 8.0. We upgraded to 8.1 soon after and there is a video about 8.1 changes
@rustem6388
@rustem6388 Жыл бұрын
Very useful! Thank you!🤩
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You’re welcome 😊
@carlosortiz5283
@carlosortiz5283 2 жыл бұрын
This is a very interesting lesson, thank you
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
You're welcome 💙
@eashikanaznineasha
@eashikanaznineasha Жыл бұрын
Best tutorials on PHP so far! Could you please share the code as well?
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Some lessons have link to the repo in description. For some lessons there is nothing to share since they are more of theory type lessons
@AMoktar
@AMoktar Жыл бұрын
Awesome 👏 thanks
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@bevedel
@bevedel 2 жыл бұрын
Thank you so much!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
You're welcome
@kooroshmoshrefi3377
@kooroshmoshrefi3377 2 жыл бұрын
Nicely explained. Thank you.
@ahmedmubarak8642
@ahmedmubarak8642 Жыл бұрын
Thank you so much.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome 🙌
@ilya_123__
@ilya_123__ Жыл бұрын
thank you!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
you're welcome
@RamonaAtkinson
@RamonaAtkinson 2 жыл бұрын
Genius!!!!!!!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
🤯🤯
@memack101
@memack101 2 жыл бұрын
Thank you.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
💙
@agahozoclaire9605
@agahozoclaire9605 Жыл бұрын
In previously videos you say inheritance cannot inherit multiple inheritance but in course of abstraction you , class field inherit text and boolean and boolean inherit checkbox and radio? before using abstract
@agahozoclaire9605
@agahozoclaire9605 Жыл бұрын
sorry multiple class*
@ProgramWithGio
@ProgramWithGio Жыл бұрын
@@agahozoclaire9605 PHP doesn't have multiple inheritance support. You can extend a class that extends another class but that's not really multiple inheritance, multiple inheritance would be something like ClassA extends ClassB, ClassC
@agahozoclaire9605
@agahozoclaire9605 Жыл бұрын
@@ProgramWithGio thanks🙏
@dangnhattrinh5500
@dangnhattrinh5500 Жыл бұрын
So if I understand, every time I have the Dependency Injection, that dependency should be an Interface, because if it is a concrete class, that violate to the Liskov principal. Am I correct?
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You don't have to have interface all the time. Its better yes to inject any implementation rather than a concrete class, but you also don't want to overdo it. It depends on the app & the type of class you are injecting.
@josephjohn4810
@josephjohn4810 2 жыл бұрын
can you create a donation link? these videos worth more than diamonds 😁 thumbs up
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you. I have Patreon (link in description) and there is also Super Thanks feature on KZbin under each video 💙
@ousssika5359
@ousssika5359 Жыл бұрын
thanks man
@ProgramWithGio
@ProgramWithGio Жыл бұрын
No problem
@johongirrahimov2343
@johongirrahimov2343 3 жыл бұрын
So it's Composition then right? In Composition we can use the same methods in 2 ore more unrelated classes?
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Kind of, we'll cover composition in more detail in 3rd section
@dhirendrasinghnegi7948
@dhirendrasinghnegi7948 2 жыл бұрын
how are you running your code in editor terminal pls explain
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
It's phpstorm terminal within the IDE, you just need to connect to your docker container and run commands there. I showed that in Docker lesson beginning of section 2.
@dhirendrasinghnegi7948
@dhirendrasinghnegi7948 2 жыл бұрын
@@ProgramWithGio thanks Gio you are very kind
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
@@dhirendrasinghnegi7948 you're welcome 🙌
@dotsad
@dotsad 2 жыл бұрын
and my mind started melting again, also do you think is a good idea to start learning laravel before learning advanced php?
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
It's ok, some of these concepts are not easy to get on first try, it took me some time as well when I was first learning so don't worry if you don't get it right away. You can learn Laravel in parallel, some of the topics in advanced series will help you understand how Laravel works behind the scenes
@brangja4815
@brangja4815 Жыл бұрын
I don't understand why the property passed into the method should be specific? Can't we just leave it as $collector?
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You don't have to, but its good to type hint everything, at least in my opinion. It prevents future bugs. You will notice I use strict types in most of my videos & type hint everything. Typehinting to specific class/interface gives you autocomplete features in IDE as well as assurance that no other type is allowed.
@gullyCZ
@gullyCZ 3 ай бұрын
this video is missing subtitles. would it be possible to supplement them?
@ProgramWithGio
@ProgramWithGio 3 ай бұрын
KZbin sometimes removes them or doesnt add them automatically unfortunately. I don't add them manually
@ahmedyasser571
@ahmedyasser571 8 ай бұрын
when the abstract class implemented the interface it didn't give an error that the class must declare the interface methods. why this happened?
@ProgramWithGio
@ProgramWithGio 7 ай бұрын
Because its an abstract class, if you dont define the method in abstract class, you would have to define it in the class that extends that abstract class. You can't instantiate the abstract classes directly
@ahmedyasser571
@ahmedyasser571 7 ай бұрын
@@ProgramWithGio excuse me can you elaborate more
@ProgramWithGio
@ProgramWithGio 7 ай бұрын
@@ahmedyasser571 In abstract classes you don't have to define the interface methods because its an abstract class, you can't create a new object directly from abstract class, you typically create a new object of some other class that extends your abstract class. That child class that extends your abstract class will need to define the interface methods if its not defined in your abstract class.
@ahmedyasser571
@ahmedyasser571 7 ай бұрын
@@ProgramWithGio thank you
@BehzodSabirov
@BehzodSabirov 2 жыл бұрын
Aaah...Now I get it
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Awesome
@dawid_dahl
@dawid_dahl 3 жыл бұрын
My mind makes me think of the Strategy pattern when I listen to this. Interfaces sounds perfect when implementing that pattern, am I wrong?
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Nope you are not wrong. That's pretty much how strategy pattern is implemented
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
Bro on some methods I have seen the return type as name of the Interface...What does that mean...how can a return type be an interface ??
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
It's the same way as accepting arguments as interface. You are returning some implementation of interface. You can return concrete classes as long it implements that interface.
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
You mean to say any class that implements that interface is returned..Is that what it means ?
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
@@rxxt-sh1vj Yes. It works the same way as in arguments. It's polymorphism, you are returning an instance of an interface, so you know that this method call will return some type of instance of that interface without being too specific. Has the same benefits as using polymorphism in arguments.
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
@@ProgramWithGio Would request you to make a video on interface type hinting that also cover return type of Interface...Thanks for taking the time to reply...I am confused..:D Returning an instance of interface means any class that implements the interface... that class object will be returned..hope that I am correct..:D
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
@@rxxt-sh1vj Watch this lesson again from 10:00 mark, its the same idea with returns. For example: interface MyInterface {} ClassA implements MyInterface {} ClassB implements MyInterface {} ClassC { public function someFunction(): MyInterface { // this function can now return any implementation of that interface, it can return new ClassA(); // or it can return ClassB return new ClassB(); } }
@abduabdu7404
@abduabdu7404 2 ай бұрын
i didn't quite understand the psr interfaces, can someone explain it to me
@ProgramWithGio
@ProgramWithGio 2 ай бұрын
Do you have any specific questions?
@abduabdu7404
@abduabdu7404 2 ай бұрын
@@ProgramWithGio i didn't understand why i i would use it
@ProgramWithGio
@ProgramWithGio 2 ай бұрын
When you may have multiple implementations of the same contract. For example, if you are implementing a payment processing & want to accept payments. You might want to use Stripe as your processor/gateway. If you code it to an interface and have PaymentProcessor or PaymentGateway interface and implement it inside Stripe class then later if you decide to switch to another provider you could easily create that other class, implement the PaymentGateway interface & most of your other code would continue to function assuming that you coded it right & they are using the interface instead of concrete class.
@abduabdu7404
@abduabdu7404 2 ай бұрын
@@ProgramWithGio Thanks you so much for your efforts , this course has been gold you deserve more recognition man, much love from Saudi Arabia
@amoskim5813
@amoskim5813 Ай бұрын
wow~
@ProgramWithGio
@ProgramWithGio Ай бұрын
💙
@saugmaddox349
@saugmaddox349 3 жыл бұрын
Hello sir, here is my question abstract class x { protected function x: void protected function y: array protected function z: string private function a: void private function x: void } How can i make an interface for an abstract method..it has no public methods.Assume that abstract class x will be inherited by another class Y which will not be abstract...Can we make an interface for such an abstract class X that has no public methods and only contains protected and private methods??
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Hello. That's one of the differences between abstract class and interface. You can't have private/protected methods in an interface, only public.
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
Bro I have one more ques...Is it necessary that an interface must be used whenever there is polymorphism...I have a class that has 15 public methods with 4-5 private methods...For better organisation of the code and readability of the implemented methods in the class... I want to make an interface and define 15 public methods signature in the interface. Is that a good practice or bad practice according to you..??
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Don't overuse the interface. If all those 15 methods are related then yea you can extract them in an interface, however, if some of those methods are not really related then you might want to extract them into multiple interfaces. Also, do you plan on implementing this interface in other classes as well?
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
@@ProgramWithGio I will not implement any of the interface in other classes...Only one class will implement a single interface in my case...:D Whats your suggestion bro..:D
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
@@rxxt-sh1vj It's up to you, I personally would not create an interface unless I saw the need to implement it in multiple classes or the need to have polymorphism. No need to overcomplicate things. Also the main deciding factor is if the methods you are planning on putting in an interface are actually related, like if one method processes transaction & other method sends an email then these two are not really related & should not be part of the same interface, you would have two interfaces one called ProcessableInvoice & Mailable interface
@rxxt-sh1vj
@rxxt-sh1vj 3 жыл бұрын
@@ProgramWithGio Bro all methods in my interface are interdependent....like I built an orm that has methods like table ...select...where....getSQL(); when all methods are chained it produces a statement like...... select * from users where id = ?. I am building a PHP framework from absolute scratch that will outperform laravel in terms of sheer speed with lowest possible size...It will be under 1 MB in size with less than 150 files and will work with single library developed by me ...the project will not need any other external dependency. My ORM can inject 10,000 records in my sql database in mere 1.64 seconds. If you will compare laravel it has 6700 files approx on just fresh installation. File size is around 32MB which cripples performance on the production server....according to my calculations as the project becomes complex..:D
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
@@rxxt-sh1vj Got it, they are then related to each other because it's a QueryBuilder essentially, so you could have QueryBuilder interface and if in future you decide to switch from MySQL to something else, you would simply create another driver class and implement that interface
@ozorg
@ozorg 2 жыл бұрын
no - playback speed is not set to 1,25 .... ;) ... great info though! thx!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Oops 😬 😅. Thank you 🙌
@paatuc6457
@paatuc6457 3 жыл бұрын
Should I just skip these advanced OOP methods, since these feels a bit too complicated and return to these when more advanced ?
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Skipping OOP is not ideal because you will need OOP if you want to work with PHP. Which topic/concept is more complicated for you? I would rewatch videos on those topics and also I would read some articles on those topics. If you have specific questions feel free to DM me on Twitter
@paatuc6457
@paatuc6457 3 жыл бұрын
@@ProgramWithGio Thanks for reply, you are easily best php or any coding language teacher, I just ate too much information for one day, I need to go slower and actually code these OOP examples to my end as well and I'm starting to get this slowly :D
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
@@paatuc6457 thank you. That is a good idea, take your time & if you have questions don't hesitate to ask 🙌
@FGj-xj7rd
@FGj-xj7rd 2 жыл бұрын
That independent debt collector is all kinds of suspect 😂😂
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
😂
@Netpilation
@Netpilation 7 ай бұрын
Rule of interfaces in php
@ProgramWithGio
@ProgramWithGio 5 ай бұрын
💙
@أحمدكلش-ض3ع
@أحمدكلش-ض3ع 2 жыл бұрын
lower the speed plz
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
I improved on that in third section. You can also lower the speed yourself on KZbin. Simply click gear ⚙️ icon and set the desired speed 👍
@أحمدكلش-ض3ع
@أحمدكلش-ض3ع 2 жыл бұрын
@@ProgramWithGio thanks
@realchicagophill
@realchicagophill 2 жыл бұрын
I think the concept of abstract is too abstract for my mind to understand.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Feel free to reach out to me on Twitter & we can discuss any questions you might have about it.
@mohamedaltahan4875
@mohamedaltahan4875 9 ай бұрын
thanks so munch, but you speak so fast
@ProgramWithGio
@ProgramWithGio 9 ай бұрын
Sorry about that. You can slow it down on KZbin by clicking on ⚙️ icon and set the playback speed
@SamuelNasta
@SamuelNasta 3 жыл бұрын
Editing tip: you don't leave ANY room for breathing Your WHOLE VIDEO looks like one enormous phrase. Yes, you should cut the spaces of breathing WITHIN phrases. But yes, you absolutely should leave some room for the brain to absorb the information you're providing.
@SamuelNasta
@SamuelNasta 3 жыл бұрын
Try to read the same message like you speak in your videos instead editing tip you don't leave any room for breathing your whole video looks like one enormous phrase yes you should cut the spaces of breathing within phrases but yes you absolutely should leave some room for the brain to absorb the information you're providing
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Thank you. I improved on this in later videos a little bit & will keep in mind for future as well. It's not just editing, it's just the way I speak :). Need to slow down a bit. KZbin lets you slow it down also & set the playback speed which should help a bit, but I get what you are saying
@SamuelNasta
@SamuelNasta 3 жыл бұрын
@@ProgramWithGio Another thing that I found later in the video In the middle parts you talked about many scenarios, wrote the code for it, but just didn't test it. If something is relevant, maybe spend 5 more seconds to run the code to show it makes it much easier to understand. Even if you talked what would be the scenario, if you didn't show it, the brain wouldn't grasp the information like it would SEEING it. It's the same if you give advice to a friend. hehehehe
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Thank you, I do try to run it every time to verify that it works, maybe I missed it in few places. Can you give me an example of where I did not run the example code?
@SamuelNasta
@SamuelNasta 3 жыл бұрын
@@ProgramWithGio 11:43 in the instanceof example
@omaryahia
@omaryahia Жыл бұрын
The incredible Gio Course🫡🥰☺
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you 💙
What Are PHP Magic Methods & How They Work - Full PHP 8 Tutorial
16:55
Program With Gio
Рет қаралды 31 М.
When to use Traits, Interfaces, and Abstract Classes in PHP
15:08
Andrew Schmelyun
Рет қаралды 24 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
The Only Time You Should Use Polymorphism
13:55
Christopher Okhravi
Рет қаралды 95 М.
Master Golang with Interfaces
21:54
Kantan Coding
Рет қаралды 19 М.
PHP - Encapsulation & Abstraction -  Full PHP 8 Tutorial
15:23
Program With Gio
Рет қаралды 33 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 987 М.
PHP Traits - How They Work & Drawbacks - Full PHP 8 Tutorial
31:41
Program With Gio
Рет қаралды 34 М.
PHP OOP Tutorial | What is a PHP interface
26:12
How to code well
Рет қаралды 22 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 902 М.
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 218 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН