I have a web app with a presentation layer and a business layer as individual projects. One being a web application and the other being a class library. I have added a web reference to the web application to use a web-service. I am having no trouble using the service API but Im finding myself adding a lot of business layer type logic in my presentation layer to utilize this API. I would love it if I could just change some of my business layer code to work with the web service, but the configuration of such sounds like a big circular no no. Anyway I would love to have my objects be able to keep doing what they're doing but have it also work with a web-service, but i find myself having to create a helper/manager class in my presentation layer to work with the web-service. This causes me to require code changes everywhere I was performing the actions on the objects that I wanted to add to with the service. What is the correct way of attacking this issue?
Im not even sure there is a legitimate question anywhere in all that rambling but if anyone could offer any helpful words i would be greatly appreciative.
Thanks!!
The way that I have approached this is to create something to this effect:
Service Layer (Devoid of any business logic, just an interface)
Service Access Layer (Devoid of any business logic or presentation logic)
Your Service layer being devoid of business logic now can be changed without affecting your business logic. Your Service Access layer on the client side shelters you from changes in the service interface as well.