Delivery and Deployment

VST14 Writing Testable Code and Resolving Dependencies – DI Kills Two Birds with One Stone


2:45pm - 4:00pm

Level: Introductory to Intermediate

Miguel Castro



Melvicorp LLC

Dependency injection (DI) is one of those terms advanced programmers throw out with an expectation and assumption of full understanding. People often ask for a recommendation for a good DI product and want to learn how to use it. When discussing the subject, it becomes immediately apparent many don't even know what they're asking about. It's easy to get infatuated by a cool buzz phrase, especially when you hear so many others using it. But to truly understand something you need to start by understanding the problem spaces that it's trying to solve. To write testable software, you need to understand and embrace abstractions and injecting them. But then you introduce the problem of having to resolve dependency chains. This is where using a DI container helps you solve both of these issues. During this session, you'll learn how to make your code testable and maintainable with the help of a DI container.

You will learn:

  • How to demonstrate problem code
  • About abstractions for across-the-board testability
  • How to use a full-featured DI container