System verification call sequence:
Mrules. addrule 'Load verification rule delegate
Mrules. checkrules (me) 'is verified by Delegate Based on the Rules saved in hybriddictionary
Use the preceding two rowsCodeTo get the code structure:
1. All rules have no logical connection with rulemanager.
2. You can define different classes to process rules of different business classes.
3. Rules are concentrated in the class for ease of Management
4. You can flexibly set verification rules by rule names.
(In my daily development, the validation of business logic is usually performed between data submissions, and those verifications are usually used to judge the value of the control on the form, check whether the data submission logic is correct. I am starting to suspect that my business logic isProgram.
In commercial programs, data is processed based on the judgment results of business logic.
For example, in the development of his system, the processing of outpatient data input includes the effectiveness of each data and the effectiveness of each data, that is, the first and second cases mentioned at the beginning.
I didn't learn this structure to learn it. My goal is to improve the efficiency of system development and reduce the cost of system maintenance.
In terms of development efficiency, the above two types of verification can be reused in work practices. The effectiveness of each data can be used to verify the data of other units, effectiveness verification between data can also be used to modify outpatient data.
From the perspective of maintenance costs, they focus the verification of effectiveness in one place or controllable place.
It seems that I still have to work hard to continue mining !)