Solved

WCF Service End Points?

Posted on 2011-02-28
6
280 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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

687 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