Design Patterns Flashcards
Name two Design Patterns
Singleton Builder Observable Factory Strategy
Builder Pattern
An object creation pattern. The point is to separate construction of a complex object from its represantation. This means that the construction process can create different representations.
Singleton Pattern
Ensures that there is only one instance of this class. This class can be accessed globally
Factory Pattern
Object creation pattern. In this pattern subclasses decide which class to instantiate.
Observable Pattern
A pattern where there is a relationship between two objects. Subject and Observer/subscriber. Subjects will notify observers/subscribers when state or information has changed.
Strategy Pattern
A pattern that enables selecting an algorithm at runtime. This is done by passing in a devised “strategy” at initialization.