The Web Service Software Factory is now maintained by the community and can be found on the Service Factory site.
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
Retired: November 2011
The business layer contains components used to implement business logic and defines business entities that are used by the business logic components.
Business components perform the core processing logic within the service. This may include the following functionality:
- Sequence calls to other business logic, data access logic, or service agents.
- Implement authorization or validation that is not specific to the service interface channel.
- Initiate and control transactions.
- Implement business rules; for example, calculations or conditional logic.
The Transaction Script (Business Action) pattern can be used to implement the entry point into the business layer when called from higher layers. Business action classes are responsible for calling other classes in the business layer and delegating calls to lower layers in the architecture.
The business layer also contains business entities. A business entity is a type of business component that represents a domain model object used within the service boundary. Typically, business entities represent real-world objects, such as customers and orders. In the Service Factory architecture, the business entities within the service implementation are not exposed outside the service boundary; they must first be mapped to data types, which represent the same domain objects in a format suitable for use in service contracts. For more information, see Data on the Inside vs. Data on the Outside on MSDN.
The business layer should contain minimal coupling with other layers in the service architecture. For example, business components should know nothing about how (or even if) business logic is exposed as a Web service, and it should not be aware of implementation details of the data access logic or service agents. For more information about the advantages of layering, see Layered Application.
The business logic layer uses the following patterns:
- Transaction Script (Business Action)
- Domain Model