2

I'm aware that there was a lot of discussion about that topic, but I'm still confused what's better for the enterpise SOA envoronment. Basically, it's a SOA system with a few of WCF web services and a few desktop WPF applications, that are changing pretty dynamically.

Option 1:

Deploy each service with mex endpoint. Implement Proxy in each client with auto-generated/discovered client. Whenever the service is changed I will open the client app, update Service References and deploy it.

Option 2:

For each service (in service's repository) implement Proxy project, with manully implemented client using ChannelFactory. Then, push this Proxy into the company's nuget. Then.. whenever I want to use this service in the WPF app, I will pull the nuget package. When the WCF service will change I will update the Proxy library, push it to nuget. And update it from WPF app.

So basically, nuget vs svcutil?

3

I would say Option 2 because it is more maintainable and clean.

You can sort of create Generic wrapper and have your customized implementation and exception handling* strategy at one place, published as nuget and can be then easily consumed by any client.

*For example the one I am currently using also take care of transforming to appropriate http status codes on web server depending on various FaultException<T> received from application server which exposed WCF services.

This is how normally we do : service and client happens to be part of same solution (of course deployment model is different for service base csproj and client application). WCF client is published as part of core library is referred by client application and since service and client application is part of same solution - you can refer data contract related .cs files as link files. Also this is pretty standard pattern for enterprise applications and nothing my own invention :)

  • If nuget, What about the client config file? – Ish Thomas May 1 '18 at 17:50
  • client config is required. also I am not expecting your nuget to be tied to specific service as you mentioned For each service (in service's repository) implement Proxy) rather it should be generic WCF client. – Rahul Agarwal May 2 '18 at 7:16
  • I will have to have Proxy project for each service, because there is different contract for each one of them. What If I want to use only one service? – Ish Thomas May 2 '18 at 13:12
  • updated answer with more detail for everyone else as well – Rahul Agarwal May 2 '18 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.