Service Layer - how broad should it be, and should it also be used from the local application?
- by BornToCode
The background:
I need to build a desktop application with some operations (CRUD and more) (=winforms), I need to make another application which will re-use some of the functions of the main application (=webforms). I'm using service layer for reusing my functions. The service is calling the functions on the BL layer (correct me if I'm doing this wrong).
so my desktop has 4 projects - DAL, BL, UI, WEBSERVICES.
The dilemma (simple but I still need some more experienced opinions):
In my main winform UI - should I call the functions from the BL - bl.getcustomers(), or do it similar to how I call it in the webform, and call the functions from the service - webservices.getcustomers?
Should I create a service for every single function on the BL even if I need some of the functions only in one UI? for example - should I create services for all the CRUD operations, even though I need to re-use only update operation in the webform?
YOUR HELP IS MUCH APPRECIATED