Figure 3 shows a simple example of one way we expect application developers to extend and modify the frameworks. The fragment of the framework shown includes two classes, Receipt, and Purchase Order Line. Each class has default attributes and methods associated with it. One of the methods on the Receipt class determines if a quality inspection is required. The default business logic for this method is a simple check of the value of the Quality Inspect attribute for the related Purchase Order Line.

The example shows that the application developer wishes to enhance this logic. They accomplish this by subclassing from the framework Receipt class and overriding the inspection method. In this example they wish to change the logic to include checks against supplier tables, and previous receipts from the supplier. They also wish to ensure that hazardous and high value products are always checked.

After the developer has made the necessary code changes they compile and reinstall the modified code. The new logic would then be in effect for quality checks, while the remainder of the framework functioned as before.


slide: Simple Framework Extension