Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming conventions again........
Message
From
28/08/1999 05:07:06
Walter Meester
HoogkarspelNetherlands
 
 
To
27/08/1999 23:56:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00258085
Message ID:
00258777
Views:
18
John, [Long Message]

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

Well I doubt this either (or WalterWorld(great wordpainting) must be rather big). Especially new developers and developers not using naming conventions use this guidelines (Pascal). Although I'm a BA in computer science i've never learned naming conventions at universaty. Even the books (C, C++, Pascal) I used at school didn't mention anything about namingconvertions. I learned it when I learned FoxPro

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

Thank you, I'll regard this as a compliment.

>I don't understand why you want to or need to disparage generally-accepted standards. NIH (Not-Invented-Here) Syndrome? It makes NO sense.

Does ALAN COOPERS idea's make no sense ? Did my observation of the deleted() tag make no sense ?? I think not.

>I challenge you to find published code that isn't at least close to the generally-accepted standards.

Well, that's a easy one, my student books are full of them, Actually it's hard to find one using naming conventions.

- Graham Glass, UNIX for Programmers and Users
- Rober.L. Kruse, Programmeren met data structuren (dutch) translated from:
Hemel Hempstead, Programming with datastructures
- Translated version of Kernighan & Ritchie - The C programming language
- J.J.M. Mesman, Pascal en PSD's (Dutch only)
- Translated version of Stanley B. Lippman , C++ primer. 2nd ed
(Only naming conventions are used for pointers and infrequent for types)
- Doug Bell, Ian morrey, JohnPugh, Software Engineering A Programming approach

When I read Visual FoxPro 3 Codebook, I see a very interesting naming convention standard.

- Type prefixes in Fields
- Type prefixes in properties
- Scope and type prefixes in variables

I'll bet not many of us use this standard.
- MS delivers us sample tables without type prefixes. Why don't we ???
- MS delevers us properties of objects without type prefixes. Why don't we ?

If we all don't use the same naming conventions or consistent, why use them at all ?
DON'T GET ME WRONG: these are also questions I ask myself, because all my apps use Type prefixes for variables.


FoxPro advisor: August 1998: page 56 Distance calculation:
The author doesn't use the scope prefix (as aposed to the other articles). The type prefix is occasionally used. But for the variables LONG1,LAT1 etc. it is not.

Page 74: Tip of the month: Packing large tables.

The example in FoxPro Advisor jan 1998, page 32, doesnt use naming conventions at all.


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

Well that's a matter of taste. And I agree: if you're used to use namings conventions it looks unprofessional at first sight....

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

O.k. But what about a self invented menubutton, made out of a bunch of other controls ?? Do I have to invent another prefix. What about OLE controls ??? Do I have to call them oleTreeview or something ?

>I don't want to come across overly harsh,

You don't :-)

>but, dammit, why mess with what works when there are a whole lot of other issues in the VFP world to obsess over.

Like ? I've seen uses of naming conventions that don't work (two big independent insurance companies). The skill of the avarage programmer there was not on a UT level. Seeing all styles of naming conventions glued together could not convince me that this was the right way. If it's rather impossible to use naming conventions consistently, I think its best to don't use them at all !

About this thread:
I started this discussion to gather other viewpoints related to the subject and make people think about why they do something. When I'm at a new project and a client tells me what to make, the first questions is: WHY ? To a lot of people this may seem irritating, but that's the way i'm trying to create a solution that fits best within a clients business.

About my motivations and reasons:
I play a different role here in the UT. It's my nature that I question everything that comes along. Therefore I'm obstinate and hard to convince. I choose for the difficult way, because the other way seemed too easy. I make my own solutions. I'll bet my apps look very different than the avarage without abandoning certain standards (like menu conventions). But if I seem to be wrong, I'm the first one to admit i'm wrong (seek Or locate thread).

Regards,

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform