Design Pattern Categories
Design pattern categories
- [Voiceover] There are three categories in design patterns: creational, structural, and behavioral.
Creational patterns-
provide a way to make objects while hiding the creation logics, rather than instantiating objects directly. In short, they deal with object creation mechanisms.
Structural patterns
Structural patterns are all about class and object composition. This design pattern tends to ease the design by identifying a simple way to realize relationships between entities.
Behavioral patterns
Behavioral patterns are specifically concerned with communication between objects, that is, how objects communicate with each other.
There are six designs that fall under
creational patterns:
Abstract Factory,--> Builder, Factory Method,--> Object Pool, Prototype, Singleton.-->
All have to do with instantiating objects.
Seven designs fall under structural patterns:
Adapter, Bridge, Composite, Decorator,--> Façade, Flyweight, Proxy.
We'll be exploring the Decorator and how it adds functionality to objects dynamically and how composition plays a major role.
Lastly, there's a behavioral category, Chain of Responsibility, Command, Interpreter, Iterator, --> Mediator, Memento, Observer, -->
State, Strategy, Template Method and Visitor.
Here we'll explore Iterator and Observer to understand how objects communicate with each other.