Design patterns vary in their granularity and level of abstraction. As there are many design patterns, we can organize or classify patterns to learn them faster. Here we classify the patterns along two dimensions: one is purpose which reflects what a pattern does and the second one is scope which specifies whether the pattern applies to classes or objects.
Along the purpose dimension, patterns are classified into three types:
1) Creational patterns
2) Structural patterns and
3) Behavioral patterns.
The creational patterns focus on the process of object creation. The structural patterns concern is, the structure of classes and objects and the behavioral patterns focus on how the classes and objects collaborate with each other to carry out their responsibilities.
Along the scope dimension, patterns are classified into two types:
1) Class patterns and
2) Object patterns.
Class patterns deal with the relationships between classes which is through inheritance. So, these class relationships are static at compile time. Object patterns deal with object relationships which can be changed at run-time and these are dynamic. Almost all patterns use inheritance to some degree.