- Proxy – “in place of” or “representing” or “on behalf of”
- Placeholder for another object to control the access.
- Proxy is the object that is being called by the client to access the real object behind the scene.
- The proxy pattern represents the functionality of another class.
- Virtual proxy is a placeholder for “expensive to create” objects. The real object is only created when a client requests/access the object.
- The remote proxy provides a local representative for an object that resides in a different address space.
- Protective proxy controls access to a sensitive master object. It checks whether the caller has permission and etc.
Proxy design pattern introduction this proxy pattern falls under the category of structural pattern first we will see the explanation of proxy design pattern this is the first explanation I will just read out proxy provide a surrogate or
placeholder for another object to control access to it proxy means in place of our representing or on behalf of and the meaning of surrogate (Act on behalf of others) okay so what is a main work of proxies it works on behalf of the real object okay are it represent real object the second explanation is proxies the object that is being called by the client to access the real object behind the scene and third explanation is in proxy pattern a class represents functionality of another class okay we’ll show you one diagram so that you will understand this explanations so left side you can see client right side you can see real subject and center you can see proxy suppose this client wants to communicate to real subject then you should communicate via proxy okay as per the proxy it is in button so if client wants to access some methods into your subject then client will send request to the proxy then proxy will make request to the real subject okay and there are four kinds of proxies are there the first one is remote proxy second one is virtual proxy third one is protection proxy for Tony smart proxy okay