Mike Yearwood
Toronto, Ontario, Canada
Versions des environnements
Network:
Windows 2008 Server
>Have very little Procedure / Function in use, not a single scx, all is done with OOP/VCX. Only for stuff that need to be in reach independent of DataEnvironment I use procdures.
>
>>I find it wasteful to write the declaration at all. Make every function or procedure a separate .PRG file. You can still call it as a function or procedure. It will run without an additional SET PROCEDURE command elsewhere in the app. Further, just add it to the pjx and it will be run in the exe again without any additional set procedure command. I believe it's the fastest way for fox to execute code.
It is faster for Fox to call a function/procedure prg than a method in a class in the exe at runtime.
I mean that if you have procedures/functions there is no value in having them in a library to foxpro at runtime. The library is possibly convenient for sharing the content with other developers - by copying a single file to that developer. In a team environment, libraries just block multiple developers building functions/procedures in the same library - requiring source control to integrate - not a perfect solution. Similarly many classes in a single vcx is a problem for teams. It's worse than the procedure library because the vcx is a binary file. At runtime though, a vcx must be opened with set classlib unless you use newobject. So there is a benefit to multiple classes in a single library at runtime, but not a design time.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement