6.05.2013

Proxy vs Channel Factory in WCF

Difference between Proxy and Channel Factory in WCF

Are you frustrated in searching Working Links through Search Engines ?

S.No
Proxy
Channel Factory
1
What is the prerequisite for Proxy ?
Only require URL where the service resides .
What is the prerequisite for Channel Factory ?
We must have direct access to the assembly that contains that service contract T for.
2
In terms of complexity ?
Very Simpler.
In terms of complexity ?
Not easier.
3
In terms of understandability ?
Easy to Understand.
In terms of understandability ?
Channels are complex, network-related.
4
How to use Proxy ?
There is Visual Studio gives us add the reference.
How to use Channel Factory ?
When we share a common service contract dll between the client and the server, we will be using the ChannelFactory class.
5
When we will go for Proxy ?
If we know that our entities will change much and the client code is more, then we need to go for Proxy.
Proxy has following limitations,
  1. Properties need to have gets and sets
  2. Constructors cannot be exposed
  3. Methods other than the service contract cannot be exposed
When we will go for Channel Factory ?
If we know that our entities will not change much and the client code is less, then a DLL would work better than a Proxy.
6
How to create Proxy ?
By using SVCutil.exe we will create PRoxy
How to create Channel Factory ?
When we are using DLL that refers Service contract interface then use the channel factory class


References:


3 comments: