9

Structural Patterns

This chapter explores four design patterns from the well-known Gang of Four (GoF). We use structural patterns to create complex, flexible, and fine-grained classes.

Structural patterns help us build and organize complex object hierarchies in a maintainable fashion. They allow us to add behaviors to existing classes dynamically, whether we designed the initial system this way or as an afterthought that emerges out of necessity later in the program’s lifecycle.

The following topics will be covered in this chapter:

  • Implementing the Decorator design pattern
  • Implementing the Composite design pattern
  • Implementing the Adapter design pattern
  • Implementing the Façade design pattern

The first two patterns help us extend a class ...

Get An Atypical ASP.NET Core 6 Design Patterns Guide - Second 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.