What is the intent of the Flyweight pattern?
Use sharing to support large numbers of fine-grained objects efficiently.
What type of pattern classification is the Flyweight pattern?
Object Structural
What is a Flyweight?
A shared object that can be used in multiple contexts simultaneously
What type of state is stored in the Flyweight?
Intrinsic
What type of state is stored with the Flyweight’s context?
Extrinsic
What 4 things must be true to use the Flyweight pattern?
What are the 5 participants of the Flyweight pattern?
What 2 issues need to be considered when implementing the Flyweight pattern?
What type of pattern classification is the Strategy pattern?
Object Behavioural
What is the intent of the Strategy pattern?
Define a family of algorithms and make them interchangeable.
What else is the Strategy pattern known as?
Policy
What are the 3 participants of the Strategy pattern?
How do the Context and the Strategy share data?
Context either passes all required data to the strategy or passes itself to the strategy
What participant does the Client interact with in a Strategy pattern?
After creating a ConcreteStrategy and passing it to the Context, Clients interact with Context exclusively.
What are 2 alternatives to using the Strategy pattern?
What type of pattern classification is the Iterator pattern?
Object Behavioural
What is the intent of the Iterator pattern?
Provide a way to access the elements of an aggregate object sequentially without exposing underlying representation
What is another name for the Iterator pattern?
Cursor
What is the key idea behind the Iterator pattern?
Take responsibility for access and traversal out of the list object and into an iterator object
What are the 4 participants of the Iterator pattern?
What is it called when a client controls the iteration?
External Iterator
What is it called when the aggregate defines the traversal algorithm of an Iterator and uses the iterator to store state of iteration?
Cursor
What type of pattern classification is the Prototype pattern?
Object Creational
What is the intent of the Prototype pattern?
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype