Popular

Dependency Injection

Published on Jan 9, 2013 556,392 views

This week, we're going to talk about the topic of Dependency Injection in Object oriented code (specifically PHP). You don't need a fancy container to do it, it's actually quite simple to do manually!

Blog: http://blog.ircmaxell.com
Twitter: https://twitter.com/ircmaxell

Comments
  • Andrew Meyer
    Andrew Meyer 2 года назад Very good job. 5 minutes to explain what other tutorials take over an hour.
  • Tai Sem
    Tai Sem 2 года назад Be grateful no matter how much time you think you wasted.
  • Robert Anic
    Robert Anic Год назад (изменено) great explanation, simple and easy.
  • Fahad Shah
    Fahad Shah 9 месяцев назад And what schools would take weeks to explain
  • Krzysztof Stankiewicz
    Krzysztof Stankiewicz 3 месяца назад It IS good... but not quite sufficient. It leaves one with the impression that DI is like a singleton with lazy init'ing getters.
  • Daniel
    Daniel 2 месяца назад No .. you just projecting it there ...
  • mrsoneji
    mrsoneji 3 года назад We need more language agnostic tutorials like this!
  • Zeeshan Haider
    Zeeshan Haider 8 месяцев назад I was taking c# in my case.
  • BlastForward
    BlastForward 4 года назад The end ...: "Use dependency injection. It may one day save your life." :D
  • Phani Raghavendra Prasad
    Phani Raghavendra Prasad 3 года назад Amazing! Love your explanation, with pictures!!
  • TitaniusMaximus
    TitaniusMaximus 2 года назад marry me
  • Mihai Nicolaescu
    Mihai Nicolaescu 4 года назад They don't teach you these things in school - not like this at least. Thank you, this was great!
  • science blossom
    science blossom 11 месяцев назад Not the fault of schools, indeed, cuz there're not enough teachers like him!
  • Bayram Aliev
    Bayram Aliev 4 года назад This is the best explanation of DI I've ever seen! Thanks Antony Ferrara!
  • Jorge Campos
    Jorge Campos 4 года назад thought exactly the same!
  • Bartholomew Tott
    Bartholomew Tott 2 месяца назад Sadly its wrong
  • TheIronWaffleMan
    TheIronWaffleMan 2 года назад This is absolutely fantastic. Brilliantly explained. Went from being iffy on the concept to totally getting it (at least as far as the video explains). Great job.
  • Darc Nawg
    Darc Nawg 4 года назад OMG! I finally get it. This is the clearest explaination that I've ever heard on DI. Proof that the teacher makes all of the difference. Thanks you Anthony. +1
  • Higor Couto
    Higor Couto 4 года назад Holy s**t. That was awesome. Congratulations man, very nice explanation.
  • Roman Levytskyi
    Roman Levytskyi 4 года назад this is just the best DI explanation i've ever seen !  
  • Chinthaka Senaratne
    Chinthaka Senaratne 4 года назад wow..i have watched many videos before related to CI. this is the best out of best.great stuff Anthony..You are truly a master of explaining complex stuff in a simpler manner. Keep it up.Well done and thank you very much. :)
  • Alejandro Veltri
    Alejandro Veltri 3 года назад Great and simple explanation!!
  • Bartholomew Tott
    Bartholomew Tott 2 месяца назад And incorrect
  • Guerino Rodella
    Guerino Rodella 4 года назад Awesome! I read, watched, searched for a lot of stuff to understand what's Dependy Injection and how and why to use it. In this f** simple video, you explained everything! Thank you!
  • Desmond Cassidy
    Desmond Cassidy 5 лет назад 5 minutes of clear explanation ...there is a plethora of explanations of DI out there that cloud over (obfuscate) the very simple and central themes of DI...this video is straight to the point...Thanks Anthony...
  • Programster
    Programster 4 года назад Others have already said it but this is definitely the best explanation on YouTube. Your video on mediators was great too. I really hope you make more of these videos about design patterns and programming concepts.
  • Александр Жеребцов
    Александр Жеребцов 4 года назад Very good! But DI Contaner is not Service Locator. DI Container very like to Service Locator if incorrectly use it (resolving dependency in class using DI Container, class does not should know about the container ). It's in principle different things.
  • Carlos Chau
    Carlos Chau 5 лет назад Very well explained! The "wall-building robot" example was excellent in explaining decoupling!
  • Frank Odoom
    Frank Odoom 3 года назад Wow best explanation so far!
  • Mihai A. Constantin
    Mihai A. Constantin 3 года назад Really good! Personally, this helped me finally understand DI. Keep up the good work!