Solved

WCF Service End Points?

Posted on 2011-02-28
6
274 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
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:vishwajan
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:vishwajan
Comment Utility
Adding to that too many service calls is a costly process
0
 

Author Comment

by:badpilot
Comment Utility
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 500 total points
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now