Exploring ways to trigger business logic
Once the data model is in place, business logic is needed to perform some automatic actions on it. Business logic can either be directly initiated by the user, with an action such as a button click, or it can be triggered automatically when an event occurs, such as a write on a record.
Much of this business logic will involve reading and writing on recordsets. The details and techniques for this were discussed in Chapter 7, Recordsets – Working with Model Data, where we provided the tools for the actual business logic implementation.
The next question is how the business logic should be triggered. This will depend on when and why the business logic should be triggered. Here is a summary of the several options.
Some business logic is tightly connected to the model field definitions. Some of the instances of model definition-related business logic are as follows:
- Data validation rules, to enforce conditions that the data...