Answer the question
In order to leave comments, you need to log in
Need a hint to explain the pattern?
Pattern Proxy (Deputy), who can tell what is its meaning? is it like an orm? Or did I not understand correctly?
It’s like that the data that came out of the database should only be changed, and not constantly send queries to the database
And when it is used
Answer the question
In order to leave comments, you need to log in
no, not like that,
proxy - redirection in fact
We turn to, for example, Shop::getDeliveryVariants()
;
and this method itself does nothing,
except for proxying to Delivery::getDeliveryVariants()
A. the pattern is arranged like this - we request methods from some class, and if it does not have such (or always) - it requests methods from other classes and gives them as its own
Almost like Decorator, but stupid, just proxies (redirects) to another.
I advise you to consider this pattern in conjunction:
Decorator , Proxy , Adapter - they are very similar and it will be easier to understand
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question