Business service layer
While application services are responsible for representing technology and application logic, the business service layer introduces a service concerned solely with representing business logic, called the business service (Figure 9.4).
Figure 9.4. The business service layer.
Business services are the lifeblood of contemporary SOA. They are responsible for expressing business logic through service-orientation and bring the representation of corporate business models into the Web services arena.
Application services can fall into different types of service model categories because they simply represent a group of services that express technology-specific functionality. Therefore, an application service can be a utility service, a wrapper service, or something else.
Business services, on the other hand, are always an implementation of the business service model. The sole purpose of business services intended for a separate business service layer is to represent business logic in the purest form possible. This does not, however, prevent them from implementing other service models. For example, a business service also can be classified as a controller service and a utility service.
In fact, when application logic is abstracted into a separate application service layer, it is more than likely that business services will act as controllers to compose available application services to execute their business logic.
Business service layer abstraction leads to the creation of two further business service models:
- Task-centric business service A service that encapsulates business logic specific to a task or business process. This type of service generally is required when business process logic is not centralized as part of an orchestration layer. Task-centric business services have limited reuse potential.
- Entity-centric business service A service that encapsulates a specific business entity (such as an invoice or timesheet). Entity-centric services are useful for creating highly reusable and business process-agnostic services that are composed by an orchestration layer or by a service layer consisting of task-centric business services (or both).
When a separate application service layer exists, these two types of business services can be positioned to compose application services to carry out their business logic. Task and entity-centric business services are explained in more detail in the Deriving business services section in Chapter 11.
Note that the hybrid service we introduced previously is actually a service that contains both business and application logic. It is therefore often referred to as a type of business service. For the purpose of establishing specialized service layers, we consider the business service layer reserved for services that abstract business logic only. We therefore classify the hybrid service as a variation of an application service, making it a resident of the application service layer.
SUMMARY OF KEY POINTS |
---|
|