Discussion - Client Server Application architectur

2019-07-20 17:12发布

问题:

I want to develop a client-server based desktop application using .Net 4, C# and SQL Server.

Please refer to the image for what i am thinking about.

There will be a server application accessing windows service or web service. The client application will have Multiple Document Interface.

Below are my points that what i am thinking about -

  1. The client application will use socket connectivity with server application so as to get authenticated from server, and also to track record of client connections over server.
  2. The service will be a web service
  3. After successful authentication the client application will directly access web service so there will be no overloading on server.

I want your feedback on this whether it is a good way to implement or is there a better way? Should i use windows service instead of web service? Should i use socket connectivity for all data communication instead of directly consuming the web service?

Thank you for sharing your time and wisdom.

Regards

Irfan

回答1:

Most definitely use a web service boundary for all your client/server communications.

WCF will do everything you want. You can expose multiple endpoints with different bindings, and even customize what kind of security they use.

Spend some time digging into the WCF documentation and I think you will find it is perfectly suited to your architecture diagram, and everything you need will be out-of-the-box.