1 The basics of Dependency Injection: What, why, and how

In this chapter

  • Dispelling common myths about Dependency Injection
  • Understanding the purpose of Dependency Injection
  • Evaluating the benefits of Dependency Injection
  • Knowing when to apply Dependency Injection

You may have heard that making a sauce béarnaise is difficult. Even among people who regularly cook, many have never attempted to make one. This is a shame, because the sauce is delicious. (It’s traditionally paired with steak, but it’s also an excellent accompaniment to white asparagus, poached eggs, and other dishes.) Some resort to substitutes like ready-made sauces or instant mixes, but these aren’t nearly as satisfying as the real thing.

A sauce béarnaise is an emulsified sauce ...

Get Dependency Injection Principles, Practices, and Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.