In defining the initial structure of a service, the following pattern is provided as a starting point for customization
and completion.
Figure 1. The base service component pattern
The elements of the pattern are:
-
Facade Component; the facade realizes the same interface as the service component itself and provides basic
capabilities for message validation before passing the request on to the per-operation components for execution. In
this case we stereotype the component as <<facade>> for clarification.
-
Per-Operation Component; given the granularity of services, it is useful in most cases to have a separate
component/class for the implementation of each operation provided by the service.
The following demonstrates the composite structure view of this pattern. In this case, the facade is delegated to by
the service component itself. As such, consumers calling operations on the service component are actually serviced by
the facade component. It would be possible to use UML 2.0 ports as well to expose the interfaces and make this
delegation explicit using connectors.
Figure 2. Base service component pattern rendered using a composite structure diagram
|