Return to profile for Alain Schlesser

Dependency Injection Deep-Dive

40 minute intermediate seminar


Properly applied dependency injection will decouple your objects, make them easily testable, and set your code up for easy maintenance and extension. However, this topic is often misunderstood and mostly ignored in the WordPress world.

In this session, we'll cover:

  • Discussion of the basic principles and their benefits
  • Overview of the different options for injection and when to use them
  • What a container is, and what it might be called based on intent
  • How aliases allow for coding against interfaces instead of implementations
  • What auto-wiring is, and how it can instantiate an entire object tree
  • Examples of what interfaces + injection make possible while being completely transparent to the consuming code
  • Drawbacks and limitations you should be aware of