views:

33

answers:

1

Hi,

I've just started looking into WCF Services (for the first time) and I need a bit of guidence on how to best design service contacts. Should these contracts be designed towards the entities within an application, e.g. IEmployee, IOrder, or more towards the processes, e.g. IWarehouse, IOrderProcessor?

I'm not sure if this question makes much sense, if not, then any examples you can provide would very much appreciated.

Kinds Regards

Sid

+1  A: 

You should name them for processes as this is how it is conceptualized in WCF. The service interface has the ServiceContract attribute and the methods have the OperationContract attribute.

The types your service uses have the DataContract attribute, e.g. Employee.

This separation between operations and data types is one of the advantages of WCF.

Rob West