Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do FunctionName.prg
Message
De
13/05/2021 15:52:07
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01680170
Message ID:
01680425
Vues:
46
>>The downside - for me - to place each function/procedure in a separate .PRG is a maintenance headache. I have not counted but the application probably has a couple of hundred procedures. And having to scroll through this list in the project manager (if necessary to look at the code of whatever), would increase the time of maintenance. I know many will say that instead of the Functions/Procedures I should have them in classes. And maybe so. But I started this application way before I knew anything about how to build classes. When I can and when it makes sense, I do refactor the code.

"If it ain't broke, don't fix it" is a marvelous motto, as is "perfect is the enemy of good." ;-)

The other good (?!) news is that the arrival of VFP Compiler changes everything again. Most functions are split out into the C++ dll whether in SET PROC or individual prg, both of which cease to exist.

One reason to use Tamar's Thor routine to break large SET PROCs into individual prgs is that next time you rebuild the app, the Project Manager will include only those prgs that are actually used, not the whole forest from the SET PROC. So depending how many different purposes are packed into huge SET PROCs you may see smaller exes with smaller lists of procedures/functions internally which could affect performance.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform