Monday 11 February 2013

WebSphere Commerce common architecture

Starting in WebSphere Commerce Version 6 Feature Pack 3.0.1, WebSphere Commerce introduces the Business Object Document (BOD) command framework. The BOD command framework is a command framework for the business logic layer, used in WebSphere Commerce Version 6 Feature Pack 3.0.1 and WebSphere Commerce Version 7. The concept of a BOD has been used in prior versions of WebSphere Commerce, but starting in WebSphere Commerce Version 6 Feature Pack 3.0.1 and WebSphere Commerce Version 7, the entire command framework is tailored to using BODs.

In prior versions of WebSphere Commerce, there are implementation dependencies between the presentation layer, business logic layer and persistence layer. The WebSphere Commerce BOD command framework architecture uses well defined interfaces to decouple the implementation of the presentation layer, business logic layer and persistence layer. From the business logic layer perspective, OAGIS messages are used as the interface for making requests to retrieve business data or invoke business logic. The BOD command framework provides the capability to process these BOD requests and responses.
The interaction between the business objects and persistence layer is isolated in an object called the Business Object Mediator. Business object document (BOD) commands interact with the Business Object Mediator to handle the interaction with the logical objects and how they are persisted.


The application is divided into the following layers:
Presentation layer
The first layer is the presentation layer, which acts as the interaction service that will aggregate the business logic together to form an application. The presentation layer will interact with the business logic through the OAGIS defined services, and does not contain any business logic directly. Retrieving business data or executing any business logic must be done through the OAGIS defined services of a service module. The presentation layer cannot query the database directly to retrieve business data and must interact with the business components. The WebSphere Commerce Management Center is an example of a presentation layer.
Business logic layer
The business logic layer provides services to return data or run business logic. Business logic in the BOD command framework is organized into service modules (sometimes referred to as components). These service modules, and the services they contain, are leveraged by the presentation layer to display data or invoke a business process.
The left side of the preceding diagram shows an approach in which services transform the OAGIS messages (BODs) to name-value pairs for processing by name-value pair commands. This makes for easy integration with existing WebSphere Commerce or customized commands. This approach is known as Service-Oriented Integration (SOI). It is appropriate to use this approach when the business logic you want to run is already written as a name-value pair command.
The right side of the diagram shows an approach in which services transform the OAGIS messages (BODs) to Java objects called service data objects (SDOs). The BOD commands use these objects as their interface to represent the BOD. The command then uses an object called the Business Object Mediator to accept service data objects and handle the mapping between these objects and how they are persisted. The business logic never needs to deal with the technology used to interact with how the data is persisted. The business logic layer passes SDOs to the persistence mechanism without binding itself to the persistence technology.