Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prgs vs Methods
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00176041
Message ID:
00176208
Vues:
40
>There is some thought that forms that will not be sub-classed should use prgs instead of methods. The arguments are
>
>1. It is much eaiser to modify a prg. You can see all functions and procedures, therefore its easier to modify the code.
>
>2. You can make modifications while the form is running.
>
>3. In general its easier to add variables and procedures to a prg than it is to add properties and methods to a form.
>
>4. If the client has a VFP on their site, and the prgs are excluded, you can easily step through the code as long as the prgs have been excluded in an Exe. You could even make modifications while the Exe is running on the client site.
>
>Any thoughts?

Dan --

From the technical perspective, Edward and Jim have summed it up very well, and I can't really add much to that.

From a philosophical perspective, the approach you describe really does not play well in an object-oriented setting, and it actually tends to short-circuit the OO power of VFP. I've heard these arguments before, and frankly (no disrespect intended here), they are almost always voiced by folks who show some resistance to learning and applying OO analysis and design.

FWIW -- Bill

PS -- Just as a sidebar, a similar debate used to rage back in the days of 16-bit FoxPro -- do you put your code in snippets, or do you put it in a .PRG? A sure way to push a FoxPro colleague's hot buttons was to start the old snippets vs. .PRG argument. What some of us didn't realize back then was that a snippet were actually sort of a jurassic method, and it offered us a relatively painless (although primitive) introduction the OO way of doing things.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform