Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Object
Message
De
25/07/2001 17:36:28
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
25/07/2001 15:51:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00535324
Message ID:
00535401
Vues:
10
>Somewhere, quite a while ago, I remember reading an article (or perhaps it was a book) about creating a custom data object in VFP as a way of handling standard data operations.
>
>Where can I go for some information on this subject, or to find a model for a data object that has already been set up?

I don't know a specific article, but the idea is really fairly basic. For example, model your data according to entities. IOW, Invoice might be a class. An invoice entity might happen to be made up of a record from customer, invoices, and 1 or more records from an items table.

You'd model a class based on the things you need to know about an invoice (properties) and the things you need to do with an invoice (methods). So, you might have Customer which could use an access method to retrieve the customer id or name from the customer table.

You'd probably have another entity called items, or some such and the same mix of methods and properties. In the items case you might have OrderMore(), RemoveFromInventory(), UpdatePrice, ReportOnHand(), Name, QtyOnHand, QtySold. The latter two might use access methods to go out and count the times.

You might want to look into frameworks, though I don't know off hand if any of the application frameworks have data classes. JVP and Duffy have a data framework, too.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform