Try OpenEdge Now
skip to main content
GUI for .NET Primer
Service Layers : Service Adapters and Service Interfaces
 

Service Adapters and Service Interfaces

You will also see examples that refer to the concept of a Service Adapter and a Service Interface. The Service Adapter is simply a layer of indirection between the Presentation on the client side, and Business Entities and other data management components on the server side. A Service Adapter takes responsibility for knowing how and where to make a request for data, so that this connection is not hard-wired into a particular user interface, which is only concerned with the definition of the data as it is displayed and updated, and not where the data comes from.
Likewise, a Service Interface defines an entry point for each accessible operation in each Business Entity or other business component. A Service Adapter on the client side can make a call to a Service Interface on the server side (again, whether the application is physically separated into client and server sessions or not). The Service Interface takes responsibility for identifying and calling the business component, so that any details of how this is done are kept independent of the call itself. These different application layers maximize the reusability, flexibility, and ease of maintenance of all the different parts of your application logic.
The following figure shows where the Service Interface and the Service Adapter fit in this layered architecture.
Figure 4. Service Adapter and Service Interface