Middle+
What design patterns do you know? What groups of patterns exist?
sobes.tech AI
Answer from AI
Design patterns are proven solutions to common development problems. Main groups of patterns:
- Creational: responsible for object creation. Examples: Singleton, Factory Method, Abstract Factory, Builder, Prototype.
- Structural: define how classes and objects are combined into larger structures. Examples: Adapter, Decorator, Proxy, Composite, Facade.
- Behavioral: describe interactions between objects. Examples: Observer, Strategy, Command, Iterator, State.
For example, the Singleton pattern guarantees that a class has only one instance and provides a global point of access to it.