OK so I've got my WCF book now and I've read the first couple of chaptersSo I now know how to create a WCF service, and how to create a client that can use the service contract provided by that service... but what I am not quite sure on (maybe it will be covered later in the book) is how you should design the service contracts that your WCF service provides.
I mean, is it common to just create one endpoint in your WCF service that exposes one class (service contract) and this one class contains every single method/property/function etc that can be called from your service? Or do people normally create several different classes that implement different service contracts?
To help me learn WCF I am going to be making the good old fashioned instant messaging application just for people in my office to be able to use. I want a WCF service to be running on our server that keeps track of who is signed in to the IM app currently and I want it to be responsible for delivering the messages from each client to each recipient. So would I just create one endpoint that exposed a service contract named something like MessengerService and then that one class/contract would contain methods such as "SendMessageToRecipient", "SignIn", "SignOut" etc etc.
Thanks in advance for your wisdom
Chris




So I now know how to create a WCF service, and how to create a client that can use the service contract provided by that service... but what I am not quite sure on (maybe it will be covered later in the book) is how you should design the service contracts that your WCF service provides.

Reply With Quote