An Overview of the Simplified Application Framework - The DocumentLayer Service
(Page 6 of 7 )
The SAF.DocumentLayer service provides developers with an easy way to create individual document process layers that are decoupled from one another, yet work together to process incoming documents as well as outgoing documents. Using the SAF.DocumentLayer service, developers can easily define in a configuration file how a particular document should be processed through each layer. As new processing layers are introduced into the system, developers can also inject the new processes into the existing layers through the configuration setting changes without touching the existing application code.
The core of the SAF.DocumentLayer is the decorator design pattern, which gives you the ability to apply services to an object in a layer-by-layer fashion. We will take a closer look at this framework component in Chapter 14.
The Workflow Service As a business document is passing through a B2B application, many business components will participate in processing the document. You have to manage the coordination among these business components to ensure that the document is processed in the correct order. As the number of these business components increases, such coordination logic will become more complicated, because more components need to be wired to each other to make everything work. Both the components and the sequence of components involved in processing a business document can change dramatically as the underlying business rules for processing the documents change.
The SAF.Workflow service reduces the complexity of such processes by decoupling the business logic for processing the document from the coordination logic that controls the sequence of the process flow. If a rule changes or a new rule is added for the way multiple components collaborate with each other, we only have to change the coordination logic of the workflow. On the other hand, if a rule changes on how one particular component should process the document, we then only have to change that particular component.
SAF.Workflow is based on the visitor design pattern to separate the workflow’s business logic and coordination logic, and make it easy to introduce the new coordination logic and business component into the workflow. We will look in detail at SAF.Workflow and its implementation in Chapter 15.
This chapter is from Developing Application Frameworks in .NET by Xin Chen (Apress, 2004, ISBN: 1590592883). Check it out at your favorite bookstore today. Buy this book now.
|
Next: Testing Projects for SAF >>
More .NET Articles
More By Apress Publishing