Tuesday, June 15, 2004
Layered Architecture and Web Services
Scott Hanselman recently laid out a wonderful description of what a common layered design should look like.
As developers begin to build software on top of web services, where does the separation between our business layer and data access layer exist? Well, it really depends on what the core functionality of the web services looks like. Some web services simply serve us by retrieving data while others apply supply specific business functionality and logic.
If I utilize a simple data retrieval web service to retrieve information (Amazon.com search service for a nice generic example) I would most likely wrap calls to it into my DAL. To me this is similar to abstracting my software away from any changes that might occur to an underlying database. In today's integrated environment, it is becomming more rare to find an enterprise application that doens't pull and push data to and from multiple data sources. Web services are just another source of data that can be made available to the business layer of an application through a uniform data access layer.
On the other hand, if a web service presents me with data that has already been processed through a logic engine, I might not include this in my DAL, but I would most likely wrap it up under some type of business layer class that gives me the benifit of abstraction.