I knew of the proxy pattern till now and recently read this article that says a virtual proxy is basically used to defer the Object Creation process of memory-intensive components thereby speeding up the Application.
But after reading that article it looks like the proxy pattern and the virtual proxy pattern are the same thing. Am I right or have I understood this wrong?
There are different types of proxy patterns. Virtual Proxy is one of them. Others (from GOF) are Protection Proxy, Remote Proxy, Smart Reference. From GOF:
A remote proxy provides a local representative for an object in a different address space.
A virtual proxy creates expensive objects on demand.
A protection proxy controls access to the original object. Protection proxies are useful when objects should have different access rights.
A smart reference is a replacement for a bare pointer that performs additional actions when an object is accessed
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