O'Reilly logo

Software Architecture with Python by Anand Balachandran Pillai

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Categories of design patterns

Design patterns can be categorized in different ways according to the criteria chosen. A commonly accepted way of categorizing patterns is based on their purpose. In other words, we ask the pattern what class of problem the pattern solves.

This kind of categorization gives us three neat varieties of pattern classes. These are as follows:

  • Creational: These patterns solve the problems associated with object creation and initialization. These are problems that occur the earliest in the life cycle of problem solving with objects and classes. Take a look at the following examples:
    • The Factory pattern: The "How do I make sure I can create related class instances in a repeatable and predictable fashion?" question is solved ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required