Link to home
Start Free TrialLog in
Avatar of Mortarello
MortarelloFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exposing services in WCF ?

Guys,

I started to learn WCF and i would like to know if Am i in right way.

I have app done in Delphi using MVC. If i  put all my business layer in SERVICE on WCF will be   many services ( about 40 ). It is  correct to expose a bunch of business like this or expose ONE Service that will contain properties type of my business ?

Tks Guys.
ASKER CERTIFIED SOLUTION
Avatar of Kiran Sonawane
Kiran Sonawane
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mortarello

ASKER

Hi Sonawanekiran,

I was thinking that, otherwise on my client side i could have bunch of references of my services ( bad practice ).

Thank you very much !!!!
I think single service will clutter the contract definition with unrelated operations.

I will recommend to think about grouping your business layer functionality in terms of business domain rather than in terms of classes. e.g. Combine all business functionality related to Purchase department in a service contract IPurchase.
You can think of some other way of logically grouping the business layer functionality into set of services. Overall idea is to reduce the number of exposed services as well as keep only related operations in a contract definition.

I think single service will clutter the contract definition>>
Disadvantage of this is,
1) Client need to remember which contract has which definition
2) At the time of versioning
Thanks for sonawanekiran and  jagrut_patel.

I'm going to use de idea of both of you.

I will separate the endpoints in domains and 1 RepositoryAddressEndPoint

This RepositoryAddressEndPoint will have a list of another guys. On my client side first goes to RootEndpoint and retrieve information about another.

I think this is a good idea for small number of clients.

:)