Chapter 4. DI patterns

 

Menu

  • CONSTRUCTOR INJECTION
  • PROPERTY INJECTION
  • METHOD INJECTION
  • AMBIENT CONTEXT

Like all professionals, cooks have their own jargon that allow them to communicate about complex food preparation in a language that often sounds esoteric to the rest of us. It doesn’t help that most of the terms they use are based on French (unless you already speak French, that is).

Sauces are a great example of the way cooks use their professional terminology. In chapter 1, I briefly discussed sauce béarnaise, but I didn’t elaborate on the taxonomy that surrounds it (see figure 4.1).

Figure 4.1. Several sauces are based on sauce hollandaise. In a sauce béarnaise the lemon is replaced with a reduction of vinegar and certain herbs, whereas the distinguishing feature of sauce mousseline is that whipped cream is folded into it—a technique also used to make mousse au chocolat.

A sauce béarnaise is really a sauce hollandaise where the lemon juice is replaced by a reduction of vinegar, shallots, chervil, and tarragon. Other sauces are based on sauce hollandaise—including my favorite, sauce mousseline, which is made by folding whipped cream into the hollandaise.

Did you notice all the jargon? Instead of saying, “carefully mixing the whipped cream into the sauce, taking care not to collapse it,” I used the term folding. When you know what it means, it’s a lot easier to say and understand.

4.1. Constructor Injection

4.2. Property Injection

4.3. Method Injection

4.4. Ambient Context

4.5. Summary

sitemap