Walter Meester
HoogkarspelPays-Bas
John,
>Naming conventions are as critical to code as syntax is to a written human language. Now, I would agree with you that scoping prefixes, sometimes, can be left out. What about object naming conventions? You left those out and those are even more critical to the contemporary VFP application. What tells you more in code:
>THISFORM.Main.ClientPage.Lastname.Value --- or ----
>THISFORM.pgfMain.pagClientPage.txtLastName.Value
.PagClientPage. ??? Seems overhead to me.....
Well, naming conventions for object are no different than for variables. If you name your object right, you won't need them:
THISFORM.MainPageFrame.ClientPage.LastNameTextbox.Value
IMHO this has a greater readability.
But I have no objection to use:
Txt prefix for Textboxes
Cmb prefix for comboboxes
But it is getting more complicated if you subclass the baseclasses. How do you distinguish your own classes from the baseclasses ??
Even the VFP team seem to have no exact standpoint on this. Subclassed object have no objecttype prefixes oposed to the standard baseclasses.
Walter,
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