PHP Object Oriented Programming (OOP): Dependency Injection (6/13)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

The Lock and Chest example made everything seem 100 more difficult. Maybe one of the worst examples in the history of programming.

slaction
Автор

Although the video is too fast the good news is that its a video and you can watch it again and again. Thanks for the content man.

kenjoela
Автор

Thanks for nice tutorials but this tutorial is very hard to understand :)
Only thing I learnt is lock. I seen it on my dream too.

MDALAmin
Автор

What? You didn't even explain what Dependency Injection is.

cjvaans
Автор

Beginner or advanced, you don't need to type that fast, it neither shows any skill nor passion. it's not a typing competition!!! it's a learning process ! 

PouyaAtaei
Автор

need a book to understand what is locked and unlocked....your explanation is just giving us headache :D

devroy
Автор

this guy is sick...dont give up guys, share the resources to get through this oop basic.

masterjupiter
Автор

Let's say for example that your example is not an example... ;)

-marcel
Автор

Hang on a minute. The speed is not the issue! The speed can be altered from within youtube video settings. It can be reduced to 75% of the normal speed. There is also rewind, pause. You can't blame the all the lack of understanding on the teacher, a large part of the responsibility lies with the student. Yes perhaps at normal speed for some it is a little too fast but this is no excuse for not learning as I have pointed out above there are other options at your disposal if you would just think out the box a bit.
Ask yourself how much effort did you put in to learn? Did you pause the video and search google to try and fill in the gaps? If you did do this and you are still struggling I would suspect that the subject may be beyond your current level of expertise and you would do well to go back and get a better understanding of the basics. Dependency Injection is really easy once you grasp the concept but it can be a real challenge getting to that point of understanding. I struggled for a while but when the penny dropped it wasn't really that big a deal.

Dependency Injection Summarised
Instead of creating instances of objects within a class, you simply pass the objects in from the outside. And because the object is not being instantiated from within the class it does not create a dependency or a tie to that particular object. Instead the tie or dependency is passed (injected) in from outside the class. That's it!! If you can grasp this you have got the basic concept.

pgtips
Автор

Awesome series but most unfortunate choice for properties' names. At some point I lost track of which is lock, which is locked, and the locked lock.... I have to find other place to understand this concept. (But I should mention that up until now all the other videos have been great.)

CiprianHanga
Автор

Thank you!
Very good for people who already knows OOP and wants to know how it works in PHP

botondkoncz
Автор

Too fast. To what kind of experts do you want to teach?

robertslater
Автор

I really had to learn some things in php really fast and these tutorials helped me. Of course for most beginners it is too fast, but for me(advanced programmer) who has not the time to spend 50min on one episode it is awesome!

gorgono
Автор

Thank you, I finally understood how to do this, most places just show it all in one page and without anything in the functions.

maraezera
Автор

you never explained the concept of chaining before doing it

sjoyce
Автор

You're not teaching
You are making yourself strong in PHP OOP

shahzaibriaz
Автор

is there a slowed down version of this series out yet?

JaxCavalera
Автор

this is OOP method- its the way of ORGANIZING to write a code which is fully functional, would help the programmer(which could be you one day)in managing the application, when you write code either for yourself, or someone else.

HemaDarshiniSelvaraju
Автор

So the big benefit that you are using DI is very simple. Code has not to be dependent on concrete classes, but on abstractions. So that it will make it easier to switch from class to class. Example:

a person drives a car. But what kind of car? Renault, porsche?

But then if you do it like this: Renault extends Car, Porsche extends car.

Then in the Car class you have to have multiple constructors to instantiate every concrete(renault, porse, etc) object.

So what yo do is create a interface: ICar

And then Renault extends ICar

And then in the concrete Renault class you just make a public constructor:

public ICar

public function __construct(ICar){}

If you do it like this, then you don't have to make everytime a new constructor.

nielsSavantKing
Автор

dependency injection is padlock on a padlock on a chest filled with padlocks?

BillyDukelow
welcome to shbcf.ru