Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper Encapsulation Techniques?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00131613
Message ID:
00137894
Vues:
24
The more I've considered how bizobj are intimately related to their data the more I like the idea of creating properties on the bizobj representing data fields. I've started a small app to examine this idea further.

I especially like how this ties in with VFP's access and assign methods. No longer will I have to place validate code in controls if I want validation right away or batch validation in a method if I want to validate all the fields before a save.

There are a few items that have come up, however: How do you deal with different field types? I believe property strings can only be 255 characters long, so how do you place a memo field in the property? The same goes for a general field type.

The only other problem I foresee with this is having to write the equivalent of a GetFldState function.


>Michael,
>
>You have to separate the bizObjs properties from the fields in the tables. You >data bind to the properties of the bizobj and then provide an Update method >for updating the fields from the properties. In this scenario the interface >controls are not directly altering the fields, they are altering properties of >the bizobj, the buzobj will update the tables when its update method is called.

Michael G. Emmons
memmons@nc.rr.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform