Behavioral Design Patterns¶
Behavioral Design Patterns (行为型模式) are a category of design patterns concerned with algorithms and the assignment of responsibilities between objects.^[600-developer__23种设计模式.md]
Unlike [[creational-design-patterns|Creational Patterns]], which deal with object creation, or [[structural-design-patterns|Structural Patterns]], which deal with composition, Behavioral patterns focus on communication patterns between objects. They help define how objects interact and how responsibility is distributed, making the communication more flexible and easier to understand.
Core Principles¶
The primary goal of these patterns is to increase flexibility in carrying out communication.^[600-developer__23种设计模式.md]
Common Patterns¶
While the source material identifies a total of 23 classic design patterns, the specific behavioral types listed below are drawn from the provided references^[600-developer__23种设计模式.md]:
- State Pattern (状态模式): Allows an object to alter its behavior when its internal state changes^[600-developer__23种设计模式.md].
- Visitor Pattern (访问者模式): Represents an operation to be performed on the elements of an object structure^[600-developer__23种设计模式.md].
Related Concepts¶
- Design Patterns
- [[Object-Oriented Programming]]