GofPatterns Gofpatterns  

Design Patterns  «Prev 

Standard Names for Design Patterns

To some extent these names are not fixed.
For instance, the Abstract Factory pattern is also known as "Kit". Many other patterns have alternate names.
However, the names of the most common patterns are becoming de facto standards in the object-oriented community.
Although names are to some extent arbitrary, nonetheless by agreeing on common names, programmers can communicate more easily and compactly.
For example, if I need to explain the Java Cryptography API to a pattern-literate programmer, I simply say that
is a Factory Method used to choose the right Template Method for the transformation.
To explain the same thing to a non-pattern literate programmer would require me to spend several pages explaining the Factory and Template Method patterns.
This is similar in some respect to how a common set of data structures which all programmers are expected to know makes programs easier to explain, document, and understand.
There is no need to constantly re-explain the same reusable material.


Modularization is a challenge in today's programming and for this reason developers are trying to avoid the idea of adding code to existing classes in order to make them support the encapsulation of more general information.
When using the Abstract Factory design pattern a framework is defined, which produces objects that follow a general pattern and at runtime this factory is paired with any concrete factory to produce objects that follow the pattern of a certain country. In other words, the Abstract Factory is a super-factory which creates other factories (Factory of factories).