Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming conventions again........
Message
From
27/08/1999 23:56:10
 
 
To
27/08/1999 15:30:53
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00258085
Message ID:
00258757
Views:
16
Walter -----

>>THISFORM.Main.ClientPage.Lastname.Value --- or ----
>>THISFORM.pgfMain.pagClientPage.txtLastName.Value
>
>.PagClientPage. ??? Seems overhead to me.....

It's an example, made to illustrate a point. Obviously, most people would not be that redundant.

>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.

People who know me here know that I rarely get too fired up on an issue but...guess what....I'm gonna get medieval. On WalterWorld, maybe your standards make sense. For a large majority of the developer world, they don't. If I run into an application coded like that, I'm going to think it was developed by a punk. Or an idiot. Depended on how well the thing actually worked.

I don't understand why you want to or need to disparage generally-accepted standards. NIH (Not-Invented-Here) Syndrome? It makes NO sense. I challenge you to find published code that isn't at least close to the generally-accepted standards.

>But I have no objection to use:
>Txt prefix for Textboxes
>Cmb prefix for comboboxes

Well thank you, but I have great objection to abortions like LastNameTextbox.

>But it is getting more complicated if you subclass the baseclasses. How do you distinguish your own classes from the baseclasses ??

Why is this complicated? You name your classes whatever you want to, because they are simply representations of the instances and never directly used. For example, if you have a textbox with special properties for numeric data entry, then name the class NumericTextbox (kinda like the way you're naming your objects) or whatever name tells YOU what is it. When you instance this textbox, use txtMyValue or whatnot. Why worry about the parent class; just name off of the Base Class.

>Even the VFP team seem to have no exact standpoint on this. Subclassed object have no objecttype prefixes oposed to the standard baseclasses.

That's right, they don't. See above.

I don't want to come across overly harsh, but, dammit, why mess with what works when there are a whole lot of other issues in the VFP world to obsess over.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform