why is proxy pattern a structural pattern and why is state pattern a behavioral pattern. What is the criteria for determining a new pattern should be considered structural or behavioral?
Patterns are structural if the focus is on how relationships between objects are organised to form larger components whereas behavioral patterns are focused on the allocation of object responsibilities and the communication between them
The proxy is structural because it acts as a surrogate for another object, state is behavioral because the state is passed in to an object to influence its behaviour at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With