Example: Pattern 03: Factor Application-specific Logic Out of Reuse Layers
Refactor all business-context-dependent logic out of services and service implementations that are planned for reuse.
Relationships
Main Description

In this example, we see the following types of Participants illustrated:

  • An instance of Manufacturer assembles the other instances into a unit that can be deployed and executed at run-time;
  • An instance of OrderProcessor realizes the Purchasing service.  Purchasing is a composite service, because its operations are realized using functionality provided by InvoicingService, Scheduling, and Shipping Service.  The implementation of Purchasing realizes the Purchase Order Processing business process.
  • Instances of the Invoicer, Productions, and Shipper Participants also appear.  In this case, they realize InvoicingService, Scheduling, and ShippingService without recourse to invoking other exposed services, thus those services are atomic services

Here, the intention is to reuse InvoiceService, Scheduling, and ShippingService in other contexts.  Those services and their realizing components would be examined for logic that is specific to a given process, such as Purchase Order Processing.  Any such context-dependent logic will be refactored into the Participants which use the reusable services, such as OrderProcessor.

 

More Information