O'Reilly logo

Brownfield Application Development in .NET by Kyle Baley, Donald Belcham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Loosen up: Taming your dependencies

This chapter covers

  • Using the dependency inversion principle
  • Understanding inversion of control
  • Testing and inversion of control
  • Implementing dependency injection

In chapter 8, we talked about how to layer our application. During that discussion, we brought up the notion of using interfaces to represent the contracts we define between layers. In this chapter, we’ll expand on this idea and outline ways to manage the interdependencies between those layers.

As always, we’ll tie this discussion back to brownfield applications. But first, let’s look at some of the issues inherent in highly coupled code.

9.1. Pain points

Problems arising from dependencies can be subtle. They don’t usually appear ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required