Hi,
We have a cut-down web version of our application for our clients which uses the very excellent .NetTiers library. In this one we use a Service layer.
We are now creating a more detailed Windows version of the application for in-house use (data entry) and so use the DAL.WebServiceClient that is generated from the .NetTiers template. As per the sample code I have seen we reference this from the Windows front-end and make calls to the .Nettiers objects using something like;
DataRepository
.EmployeeProvider.GetByEmployeeID(_employeeID);
On closer investigation I note that this data access method goes directly to the data layer, bypassing the service layer altogether. We do have quite a bit of custom code in the service layer... some where we have added various classes that inherit from the ProcessorBase for performing tasks, custom code that is specific the the entity that the service is linked to (e.g. our "Part" service calculates a price based on the customer and the quantity required, and we were planning on adding Workflow into the service layer.
SO... if we wish to continue to make use of the Service layer I am thinking that in the Windows application the service layer should be accessed directly from the Front-End... and to standardise the application we should probably make all calls to access data through the Service Layer, which would, in-turn call the DAL.WebServiceClient, which would then access the DAL through the web service on the server?
I must admit that it did seem strange that the DataRepository is usually accessed directly from the front-end in most of the sample code I have seen, but then I guess having a Service Layer (or Domain) is optional.
In terms of actual system components and the physical layering for a Windows application I assume we would be looking at; Windows Front-End, Service Layer, DAL.WebServiceClient and Entities on the client PC AND on the server we would have Web Service, DAL, DAL.SQLClient and Entities?
Thanks in advance for any help with my understanding of this. I guess I just need confirmation that I am on the right track in terms of the overall architecture and it usage.
Andrew