Separation of Concerns and Business Processes
The notion of separating business logic from presentation logic is well established in technologies such as J2EE. The Struts framework provides separation by its use of the MVC (Model View Controller) design pattern to avoid duplication of access logic. The software architecture movement views SOC as a fundamental approach for creating architecture-driven designs.
In fact, SOC has been with us for a long time. For example, look at the way networks are designed and built: Devices are selected and configured to run (usually) several protocols, and services are delivered across the network. SOC also permeates society—if you want a loan, it’s unlikely you’d make much progress by going to the dentist! Rather, you go to the service provider who can deliver your requirements.
Software is one of the few remaining areas where most vendors are still following a one-size-fits-all approach. This is largely because no widely adopted standard has existed up to now for expressing business process logic. As we’ve seen, BPEL now fills this gap.
The Advantages of SOC
If we look at Figure 4, an organization migrating to web services can use this as an opportunity to encourage more generic software while simultaneously expressing business logic in BPEL. Such a framework offers scope for organizational differentiation.
Customization is the key as vendors try to address segmented markets. For this reason, generic software is not just desirable but is in fact a business imperative.
Let’s take a look at what BPEL has to offer.
- <invoke>: Used to call a service synchronously, such as the Confirm Details element in Figure 2.
- <assign>: Used to manipulate XML documents prior to invoking a web service.
- <faultHandlers>: Used to catch and manage exceptions (such as if a customer has bad credit).
- <flow>: Used to initiate asynchronous service execution.
- <receive>: Used to handle asynchronous callbacks from long-running services.
- <switch>: Used to support decision-making, such as booking the lowest price.
These facilities allow for a combination of flexible manipulation of business processes as well as a clear separation between business process logic and software.