skip to Main Content

Welcome

Say hello to the toggle bar. This is an optional section you can use to display any content you'd like. Simply select a page from the theme panel and the content of the page will display here. You can even use the drag and drop builder to create this! This is a perfect place for your company mission statement, alerts, notices or anything else.

Get In Touch

Email: support@total.com
Phone: 1-800-Total-Theme
Address: Las Vegas, Nevada

Our Location

togglebar-map

Proxy Pattern

Post Series: Structual Design Pattern

The proxy design pattern is used to provide a surrogate object, which references to other object. Proxy pattern involves a class, called proxy class, which represents functionality of another class.

  1. Objects need to be created on demand means when their operations are requested.
  2. Access control for the original object is required.
  3. Allow to access a remote object by using a local object(it will refer to a remote object).

Subject: This is an interface having members that will be implemented by RealSubject and Proxy class.
RealSubject: This is a class which we want to use more efficiently by using proxy class.
Proxy: This is a class which holds the instance of RealSubject class and can access RealSubject class members as required.

Implement

Usage

  1. Virtual proxies : Hand over the creation of an object to another object
  2. Authentication proxies : Checks the access permissions for a request
  3. Remote proxies : Encodes requests and send them across a network
  4. Smart proxies : Change requests before sending them across a network

Resource

http://www.dotnettricks.com/learn/designpatterns/proxy-design-pattern-dotnet

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top