7

Strategy, Abstract Factory, and Singleton Design Patterns

This chapter explores object creation using a few classic, simple, and yet powerful design patterns from the Gang of Four (GoF). These patterns allow developers to encapsulate and reuse behaviors, centralize object creation, add flexibility to our designs, or control object lifetime. Moreover, you will most likely use some of them directly or indirectly in all the software you build.

The GoF is the name given to Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, authors of Design Patterns: Elements of Reusable Object-Oriented Software (1994). In that book, they introduced 23 design patterns, some of which we revisit in this book.

Why are they that important? Because they ...

Get Architecting ASP.NET Core Applications - Third Edition 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.