Tutorials
SOA Web ServicesIn the previous section, we looked at the various patterns for e-business. We will now study these patterns in more depth in the context of an SOA implementation. In an SOA approach, the focus is on creating and reusing loosely coupled services rather than creating coarse-grain applications.
The building blocks are services, which can be composed to meet the business needs. Such services are self-contained, modular, and composable into larger services Applications on the other hand are usually large and inflexible. We will now describe the various patterns in the context of SOA.
The self-service business pattern captures direct interaction between the business user and the service provider. The user may be a customer, an employee, a business partner, or a stake-holder in the company. The service provider is the business that is providing the desired service to the consumer. Thus, the self-service business pattern nicely fits into the SOA paradigm where the main building block is the service.
The architecture of a self-service business pattern is shown in the following figure.

In this pattern, the presentation tier consumes the service provided by the web tier, which in turn consumes the service provided by the back end. This provides the direct interaction between the service consumer and the service provider with the help of services invoked in a chain-like fashion.
To apply the Self-Service business pattern, analyze the business requirement to assimilate what can be offered as a service. An example could be that employees need to look up salary benefits. Usually, these benefits do not get modified over a very long period of time. A list of benefits may be made directly accessible to the employees so as to eliminate repetitive requests made to the payroll department. You may provide a secured web page to employees for viewing the list of benefits. The web page may also provide querying facilities on the benefits database.
Another example is reserving a seat on an airplane. A few years ago, tele-checkin facilities were not available. A traveller had to check-in well in advance at the airline's counter to get a good seat. With the introduction of tele-check-in you can now reserve the seat couple of days in advance.
However, this still requires human intervention. Recently, many airlines have started offering this as an online service to the customers. The seating map of the airplane is made directly accessible to the customer over Internet. The customer can select the seat of her or his choice and gets an online confirmation of the reservation. The application of the Self-Service pattern fits perfectly in such a situation.