Software Practices

VSH16 DI Why? Getting a Grip on Dependency Injection


2:30pm - 3:45pm

Level: Introductory to Intermediate

Jeremy Clark

Consultant, Speaker & Mentor

Many of our modern frameworks have Dependency Injection (DI) built in. But how do we use that effectively? We need to look at what DI is and why we want to use it. That's why we're here. We'll look at the problems caused by tight coupling. Then we'll use some DI patterns such as constructor injection and property injection to break that tight coupling. We'll see how loosely-coupled applications are easier to extend and test. With a better understanding of the basic patterns, we'll remove the magic behind DI containers so that we can use the tools appropriately in our code.

You will learn:

  • The "what" and "why" of Dependency Injection
  • How loose coupling helps with extensibility and testability
  • How to use the constructor injection and property injection patterns in our code