Software Practices

TH12 End-to-End Dependency Injection & Testable Code

06/15/2017

11:00am - 12:15pm

Level: Intermediate

Miguel Castro

Miguel Castro

MRD

Principal Consultant

Melvicorp LLC

Dependency Injection is one of those terms advanced programmers throw out with an expectation and assumption of full understanding on the part of the receiver. Often when people start talking about DI, though, it becomes immediately apparent they don't know what they're talking about. It's easy to get infatuated by a cool buzz phrase, especially when you hear it used by so many others. To truly understand something, you need to start by understanding the problem it's trying to solve. It's important to learn the concepts behind DI so you can write software you can properly test. This session will bring you up to speed. You'll learn about dependency injection from concept to implementation, and use raw code samples to show you how it works and what problems it solves. You'll see how writing abstracted code can help you test your applications much better, whether or not you're using a DI container. You'll also learn about DI containers, some of the characteristics and features they offer, and examine implementation examples in three different platforms.

You will learn:

  • About using DI for everything
  • Completely eliminating class instantiation
  • Ensuring across-the-board testability