Hi, I am looking to write some webservices.
What defines one unit of "service". I note that as apart of one project you can have multiple .svc service files.
How do you normally segment your services? For example, a banking app:
Would you have one service (.svc) for?
- Client
- AddClient(Client newClient)
- DeleteClient(Client client)
- Account
- SetName(string name)
- SetType(AccountType type)
- Transfer
- SendMoney(Client client, etc)
- ReceiveMoney(Client client, etc)
- HomeLoan
- AddNewHomeLoan();
- RemoveHomeLoan
Is there a method of grouping the entities? For example, instead of having a transfer service, you could put send and receieve money in account service because you receive and send out of accounts.
This also brings another question in regards to methods and parameters. If I wanted to add an edit client, would one normally add a method like EditClient(Client client, Client newClient), and replace the whole client with another client object? Or would you add separate methods for editing a client for example: EditName(Client client, string name) under Client service?
I'd like to properly lay out where the operationcontracts will fit in my web services.