Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Breaking the nTier design
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00473396
Message ID:
00476981
Vues:
37
the business rules is the "heart" of the business , and this format is no secure, this issue not matter?

only my .02
>>What we need is a way to describe business rules in an XML format that can be read and interpreted by any platform (VFP, VB, JScript, VBScript). This way, we could write business rules in one place and any code dealing with the data could read the business rules document, and validate data against it however it sees fit.
>>
>>>It's a very interesting and though provoking issue. Are you aware of any people who have written on patterns to apply when doing such coding?
>>
>>There was an effort lead by IBM to develop BRML, and they released a 1.0 of a product called CommonRules that was a set of Java libraries to make use of it. However, I can't find any recent documents on the current state of BRML, and I'm not sure if it has transformed into something else or what.
>
> When we talked about this over on the West Wind site, I took a look at the IBM stuff. I couldn't find much recent info about it, though. I really like the idea since it's such a cool way of distributing business rules. I've been thinking, even a simple XML format could get a lot of reuse.
>
>Eg (small XML snippet):
>
>
><rules name="SomeBusinessObject">
>  <validate rule="mustkey">Field Name</validate>
>  <validate rule="range" low="1" high="100">field Name2</validate>
>  <validate rule="other" class="className">field Name3</validate>
>  <validate rule="mask" mask="(999)999-9999">Field Name4</validate>
></rules>
>
><errors name="SomeBusinessObject">
>  <message rule="mustkey">Please fill in the field #fieldname#</message>
>  <message rule="range">Please select a number between #low# and #high#</message>
></errors>
>
>
>
> Instead of trying to create an XML format that can define all possible rules of validation, you keep it down to a simple preset number of common validation rules. Any rule that doesn't fit into one of the presets could be defined by the "other" rule, with a "class" attribute. Then while validating you can create an object of the type specified in class to perform the validation. This kind of thing should be pretty easy to code & parse. The "errors" section would be a way of overriding the default error messages and could have a name property that associated the messages with a group of business rules.
>
> Now I've just got to find some free time or a project where a customer will pay me to develop this ;-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform