Proxy pattern એક placeholder અથવા surrogate આપે છે અન્ય object માટે તેની access નિયંત્રિત કરવા માટે। proxy પાસે real object જેવો જ interface છે પણ behavior ઉમેરે છે — જેમ કે lazy loading, access control, caching, અથવા logging — પછી તેને delegate કરતાં પહેલાં.
Proxy pattern શું કરે છે
PROXY → an object that STANDS IN for another, controlling access to it:
→ same interface as the real object (clients use it transparently)
→ adds behavior BEFORE/AROUND delegating to the real object
→ controls WHEN and HOW the real object is accessed
→ "a stand-in that adds control/behavior"
