Solved

WCF Service End Points?

Posted on 2011-02-28
6
279 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
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 500 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

697 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