xander
xander

Reputation: 7

Proxy and Proxy in Web Services

Could anyone please explain this from the point of view of a beginner asp.net programmer?

  1. What is a Proxy class? What are the main uses of it in asp.net?

  2. What are the main uses of proxy when using web services?

From what I've read so far, I understand that web service proxy, we don't have to reference the service through out the application. We can simply set it in web.config and change it there whenever required.

Upvotes: 1

Views: 353

Answers (2)

Richard
Richard

Reputation: 108975

From the classic Design Patterns: Elements of Reusable Object-Oriented Software's description of the Proxy pattern:

Provide a surrogate or placeholder for another object to control access to it.

In web services the proxy is a class that looks like (ie. has the same set of methods) as the service but sits on the client side. The proxy converts your local member accesses into remote, over-the-network, accesses of the actual services.

In other words: the proxy largely hides and encapsulates all the network protocol handling and data serialisation.

Upvotes: 1

Ehsan
Ehsan

Reputation: 32651

What is a Proxy class

Well proxy is infact a pattern, you can read all the details here

What are the main uses of proxy when using web services

Like any other proxy class, it acts an interface to your webservice.

Upvotes: 0

Related Questions