Aller au contenu
AFUP AFUP Day 2025 Baromètre Planète PHP PUFA
 

Dependency Injection and Dependency Inversion in PHP

Description

Dependency Injection and Dependency Inversion are important tools for writing testable and reusable code. They are available in any object oriented language and PHP is no exception. In this talk we will look at both Dependency Injection and the Dependency Inversion Principle, how they fit in with SOLID, and why they should be used when writing object oriented code. How are objects wired together? What is an object graph? Is a Dependency Injection Container the right way forward? Can we do this automatically, and are there any patterns or reusable components available to help us achieve reusable and decoupled code? These are some of the topics covered in this talk from both a theoretical and a practical standpoint. Walking out of the room you should understand why dependency injection is so heavily advocated in programming and how you can use it to write awesome, decoupled code in PHP.

Conférence donnée lors du PHP Tour Nantes 2017, ayant eu lieu les 18 et 19 mai 2017.

Informations complémentaires

Vidéo

Le speaker

James MALLISON

James is an English Senior Software Engineer / Architect working with @trivago in Mallorca, Spain with a particular interest in software and technical architecture. Technically opinionated, he's passionate about best practices and frequently looks for shortcuts that can work for his team while still adhering to the principles that define good programming.

Commentaires

well explained and clear :)
Nicolas, le 19/05/2017
Great step-by-step digging into the reasons for DI and profits of it. Slides were informative, the code was self-explainatory and easy to understand.
Dmytro Naumenko, le 19/05/2017
a good recall about DI
Mikaël DELSOL, le 21/05/2017
Nice talk , thanks
Ulrich, le 21/05/2017
we should never forget the whys and the basics, great talk, great speaker
Wijdane AOUFI, le 22/05/2017
great talk
Jacques Billard, le 22/05/2017
Thank you James for that clear talk about DI, clear and well explained...
Stéphane Hulard, le 22/05/2017