Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WCF Service End Points?

Posted on 2011-02-28
6
Medium Priority
?
285 Views
Last Modified: 2012-06-27
I'm buildiing my first WCF service as the back end to a lob application and I'm a little confused as to what's the best way to design it.

There will be hundreds of functions in this, should I have these all under one service (endpoint?) or should it be seperated into different services ie.

CustomerService:

addCustomer
getCustomer
getCustomerCollection
etc.

PaymentService:

addPayment
getPayment
etc.

Doing it this way would mean that I would end up calling functions inside one service from another service though, is this good practice?

Thanks!
0
Comment
Question by:badpilot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:vishwajan
ID: 35000658
A suggestion would be services are meant for configuring. Have a business logic layer which would be called by the service. I suggest you to keep different services but calling methods inside one service from another is not a good practise. If you can elaborate on it we could do a better design of your problem
0
 

Author Comment

by:badpilot
ID: 35017411
I'm confused by what you mean by services are meant for configuring?

I want to create a WCF service that will deal with the business logic of the application. So are you saying that all of my methods and functions (which will be in their hundreds) should all be under the one service and endpoint?

Thanks
0
 
LVL 1

Expert Comment

by:vishwajan
ID: 35020624
Nope, that is not what i meant. Have a business layer where you write the logic. Your service layer has to just call the method in Business Layer. Your service should just act as a medium to your UI layer and your business layer. This is what i meant in service should be just used for configuring.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 1

Expert Comment

by:vishwajan
ID: 35020638
Adding to that too many service calls is a costly process
0
 

Author Comment

by:badpilot
ID: 35036804
I think I understand what you mean, I will have a business layer where all of they heavy work is done but that still doesn't avoid the fact that my service will have hundreds of functions that the presentation layer will call and then the service will call the methods in the BL.

I guess I'm asking how I can separate these functions up so I can better manage them when creating the service and when calling it, or is that even necessary.

Thanks for bearing with me on this.
0
 
LVL 1

Accepted Solution

by:
vishwajan earned 2000 total points
ID: 35039008
You would need to identify the functional areas and divide them in to different services. For eg if your service method calls a data access layer which would call the Stored procedure, then identify all those functions and put them in one service called Data Manager. If you are doing some business calculations then identify all those and put them in Business Implementation Service.

Do this analysis for all the methods and finally u would end up modularizing your methods in to different categories, which would be easily maintainable.

Hope this is helpful to you.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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