Extracting Domain-Based Components

Domain-Based Componentization lets you "specialize" a program based on the values of one or more variables. The specialized program is typically intended for reuse "in place," in the original application but under new external circumstances.

After a change in your business practices, for example, a program that invokes processing for a "payment type" variable could be specialized on the value PAYMENT-TYPE = "CHECK". Component Maker isolates every process dependent on the CHECK value to create a functionally complete program that processes check payments only.

Two modes of domain-based componentization are offered:

Use the simplified mode when you are interested only in the final value of a variable, or when a variable never receives a value from outside the program. Use the advanced mode when you need to account for data coming into a variable (when the variable's value is repeatedly reset, for example). The next two sections describe these modes in detail.

Tip: Component Maker lets you set the specialization variable to a range of values (between 1 and 10 inclusive, for example) or to multiple values (not only CHECK but CREDIT-CARD, for example). You can also set the variable to all values not in the range or set of possible values (every value but CHECK and CREDIT-CARD, for example).