Reputation: 7
Could anyone please explain this from the point of view of a beginner asp.net programmer?
What is a Proxy class? What are the main uses of it in asp.net?
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
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