Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public variable
Message
From
16/03/2011 00:13:13
 
 
To
15/03/2011 10:11:24
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01503562
Message ID:
01503822
Views:
55
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform