Each behavioral pattern
solves a different problem, but many share certain characteristics.
Most behavioral patterns allow programmers or users to change the behavior of objects, classes or sub-systems by changing the parts that make up the system. This makes the system easier to understand by separating the essential parts from the variable parts.
Furthermore, the interface generally remains the same even when the variable parts are swapped out.
Other beneficial effects of using behavioral patterns include:
- Decoupling objects from the objects that send requests to them and that they send requests to
- Allowing algorithms to be parameterized and selected dynamically
- Queuing messages and executing them in sequence (particularly useful in a multithreaded environment)