Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public variable
Message
De
16/03/2011 00:13:13
 
 
À
15/03/2011 10:11:24
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01503562
Message ID:
01503822
Vues:
53
I'm using VFP with MySQL database.
and I figured out it that every (remote) view will cost MySQL one connection.
That why I tried to convert some views to public variables in order to save the resources.




>>I use a lot of public variables using AddProperty()
>>
>>is there any disadvantage using too much public variables?
>>
>>thanks for the help
>
>I saw a program where a public variable would have resulted in patient fatalities. The patient a was stored in a public variable. Open another window and load a new patient - now the public variable holds patient b. Go back to the first window. Changes made now affect patient b. As I pointed out, if patient a needed clot busters and patient b was a hemophiliac, potentially two deaths. Had these programmers put the patient id in the form it would have been smarter.
>
>Public variables and properties should be very rare. The benefit to putting properties in an object is that with an object you can at least control changes.
>
>Should we wait for a major disaster, like Japan's nuclear stations, or an airline accident to not do a stupid or even fatal thing?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform