In this example, you create a Province program (similar to the Country or State programs), which you can use to create, modify, view, and delete provinces. The example includes a description of how to create a lookup for the existing Country component, which you select in order to identify the country to which the province belongs. You use the non-intrusive customization method to deploy the customized code in the baseline.
When coding a user-defined component, you use non-intrusive customization techniques. QAD application component code is based on a standard code template. You can customize any of the standard activities (for example, Create, Modify, or Delete) by writing code that is activated with a publish-subscribe mechanism, in which a customized event is published before or after the component code. A code template (
BComponent.p) is provided for each business component. The template code is commented, and to hook the event code into the component process, you uncomment the event and add the necessary component code. This process is called
non-intrusive customization, because the customized code is added before or after the standard code, but does not intrude on the standard code itself. This technique is described in
Customizing Business Logic.