Applications Composed Of Components

An application that is used with a transaction processing system is composed of components. These components fall into two general categories. The first type is an application component The job of this component is to perform some type of business rule processing for the application. An example of this could be an application component to compute the sales tax for an order.

A sales tax component would need to know each item that was being purchased. Each item would have a price associated with it. An item could also be taxable or non-taxable, or it could be taxed a rate that is different than other items. As we saw in Chapter 1, these are known as "business rules" for the application, as they provide information as to the business aspect of the application. The sales tax component would go through each item in the order and add up the total sales tax for the order. This value would then be returned to whatever system invoked the component.

The other general type of component is the data access component The job of this component is to provide a method for the system to interact with the physical data itself. This physical data could be stored in a database, or in some other type of data storage mechanism. An example of a data access component could be a customer component.

The customer data component would be responsible for providing information about a selected customer based on that customer's unique identifier. The component would translate the information from the format that the data was stored in to the format that was used by the application. It could also be responsible for ensuring the integrity of the data. If there were two tables that held customer information, the data object would ensure that changes in one would be properly reflected in the other.

The application is built by connecting these application and data components together such that the system will perform the tasks that the user wishes to perform. They form the two middle tiers of the traditional four-tier client-server architecture, with the user interface and the database being the two remaining components. Each of the tasks the user wants to perform is called a transaction, as they represent a single instance of work that the application performs.

© 1998 by Wrox Press. All rights reserved.