Normal Topic Field naming convention (Read 2522 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Field naming convention
Dec 18th, 2003 at 5:39pm
Print Post Print Post  
While I sit and wait for the big brown truck to deliver my long awaited Sesame, I have been going over the list I have put together of the fields that I will create in my Sesame database.

I was wondering am I better off using an underscore to divide words or not. For example Home address. Am I better off using HomeAddress or Home_Address.

I re-read the article Good Programming Practices in SBasic By Erika Yoxall, to see if there were any pointers on field names and noticed Ms Yoxall uses no underscore. In her examples she uses:

vLast = LastName
vMiddle = MiddleName
vFirst = FirstName

So the question Ms Yoxall and other GURUS,  is the recommended method no spaces and no underscore?

Thanks for the input
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: Field naming convention
Reply #1 - Dec 18th, 2003 at 6:05pm
Print Post Print Post  
I am NOT going to claim "guru" status, but here's my thoughts on whether to underscore or not.  I prefer not to, and it's for one main reason, and one minor reason.

Let's say that you use  Home_Address   as your layout element (field) name.  When you prepare any written documentation and decide to use underlining as a means of emphasis, you and anyone else that reads that documentation may or may not see that underscored space:

1)   Home_Address   
2)   Home_Address 
3)   HomeAddress

On #2 above, there is an underscored space, but I don't think it is visible.  (The underscore isn't visible on my preview of this message).  So this can be potentially confusing if you or someone is referring to printed material, and then decides to type  Home Address   (not underscore) in some area of the application to perform an action on that field.

The other "minor" reason...  I'm a decent touch typist, but hitting the hyphen/underscore key without looking is about a 33% possibility.  I consistently hit the "zero", or the "=" keys about as often as I hit the intended hyphen key!


  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Field naming convention
Reply #2 - Dec 18th, 2003 at 7:35pm
Print Post Print Post  
Quote:
So the question Ms Yoxall and other GURUS,  is the recommended method no spaces and no underscore?


Guru Yoxall says:
No spaces is recommended. It is perfectly acceptable to either use an underscore is place of the spaces,

Last_Name

or to use no underscore and title case.

LastName

The second way is a bit more modern, but either way is just fine!  Grin

BTW, the article Bob mentions is located at
http://www.lantica.com/Support/sesamelibart26.html
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged