Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Consultant for Document Validation Engine
Message
De
20/03/2009 09:20:59
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
19/03/2009 22:58:29
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01388942
Message ID:
01389957
Vues:
44
Hi Liew,

The need and reasoning all sounds logical to me. The trick is going to be to figure out all the different examples of rules you would potentially need and then an appropriate table structure to store the information needed for creating the rule. I would suspect just off hand, there would be several different types of rules that would have a different values in the table. The rules class is going to first need to find the type of rule in order to know what values to get from your rules table and how to use them. I don't think if it was me I would use a text field for free hand writing of rules as your rules code would choke everytime someone put some written text in there that doesn't work for the code. Design is going to be the key to this puzzle, but doable in my opinion. I wouldn't be surprised if someone has done something similar out there.
Tim

>Hi Tim,
>
>Basically our web app was developed in .Net environment with MM and we have some VFP COMs to handle so simple validation. But due to many different requirements from our clients. We need flexibility in the data validation component meaning we can change the business rules depending on client requirements.
>
>Eg.
>
>1. Client A may want a certain field to be mandatory based on a certain condition whereas client B may want the same field to be mandatory at all times and client C may want the field to be optional.
>2. Client A may want a certain field to be a certain set of values based on another field value.
>
>Because of these requirements, the validation rules must be data driven that can be changed without changing the application code.
>
>Validation will be executed based on rules defined in a MSSQL table.
>
>The rules table maybe something like this:
>
> BO Rule Expression Error Message
> BO1 TxnCode =”ABC” AND EMPTY(Reason) Reason must be filled for Txn Code, ABC!
> BO1 TxnDate less than Submit_Date + 7 Txn Date must be at least 7 days after submit date
>
>We are not sure if above is easily achieved using .NET code.
>
>But we have a few senior VFP developers who know VFP has powerful commands such as EXECSCRIPT and EVALUATE that allows for execution of code that is only known (retrieved from rules table) at runtime.
>
>We are therefore looking into having .NET passing a record object or XML string of a record data to a VFP COM which will then read a rules table and execute the validation specified in the rules table.
>
>Thanks.
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform