Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Placing business rules in a table
Message
From
18/07/2001 07:25:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/07/2001 20:50:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00531066
Message ID:
00531905
Views:
10
Actually, I know very little about 3-tier models, so I will let others answer whether this is consistent.

I believe that I manage to get some separation between the database and the form. Specifically, I can use the same validation rules in several forms. Although this is a quick solution, this might not be satisfactory for advocates of a 3-tier model.

Actually, I think I have read that a 3-tier model would require separate programs, perhaps on different machines (but not necessarily) for: a) the database server, b) the business rules, c) the client interface. Therefore, my program is actually single-tiered: Visual FoxPro does everything.

Saludos, Hilmar.

>Hi Hilmar,
>
>Thank you for your answer. Glad to see that somebody does. I am groping for an easy way to implement this middle tier thing, where the business rule is neither in the form nor the database.
>
>Add "FieldName" field to "Validation", "FieldValid()" to the DBC, and code to the UI classes (maybe to triggers too?) that calls FieldValid(), which performs field level validation based on the code in Validation.Rule.
>
>Do you think that this is consistent with a proper 3-tier model?
>
>Thank you.
>
>Alex
>
>
>>>The question is: Does anybody here use a table to store validation procedures?
>>
>>Yes, I do.
>>
>>In my database container, I have function RecordValid(). This function is called from each form in my application.
>>
>>Table validation has the following fields:
>>

>>Table (C)
>>Order (I)
>>Rule (M) && Rule to be evaluated
>>Spanish (M) && Error message in spanish
>>Comments (M) && For the programmer
>>Warning (L) && if .T., warning only. Record is still saved.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform