[Last Call] Learn how to a build a cloud-first strategyRegister Now


Exposing services in WCF ?

Posted on 2011-10-11
Medium Priority
Last Modified: 2012-06-21

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.
Question by:Mortarello
  • 2
  • 2
LVL 17

Accepted Solution

sonawanekiran earned 2000 total points
ID: 36947812
WCF service gives you both ability. You can expose single WCF service with multiple endpoints. Better way to have single endpoint with different type of your business objects.

Author Comment

ID: 36947838
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 !!!!

Expert Comment

ID: 36947891
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.

LVL 17

Expert Comment

ID: 36947932
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

Author Comment

ID: 36948267
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.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question