Tag

dependency injection

Abuse of Abstract Factories

From Dependency Injection Principles, Practices, and Patterns by Steven van Deursen

This article discusses why Abstract Factories shouldn’t be used to create stateful Dependencies with a short lifestyle and why it’s generally better not to use Abstract Factories to select Dependencies based on runtime data.

Understanding the Composition Root

From Dependency Injection Principles, Practices, and Patterns by Steven van Deursen and Mark Seemann

This article describes where and how programmers should compose an application’s object graphs and the concept of the Composition Root.

Writing Maintainable, Loosely-Coupled Code

From Dependency Injection Principles, Practices, and Patterns by Steven van Deursen and Mark Seemann

What purpose does DI serve? DI isn’t a goal in and of itself, rather a means to an end. Ultimately, the purpose of most programming techniques is to deliver working software as efficiently as possible. One aspect of that is to write maintainable code. This article discusses what DI is (and is not).

Injecting objects in sealed code

By Dhanji R. Prasanna, author of Dependency Injection
This article is excerpted from the upcoming title Dependency Injection by Dhanji R. Prasanna and published by Manning Publications. It shows you how to use inject-sealed, third-party code.

Injecting objects in sealed code (PDF)

© 2022 Manning — Design Credits