Yeah, I use a a similar notation, although I often stray out of the one
character prefix when dealing with "non-native" datatypes like lists,
queries, etc.
I use some breed of Hungarian notation regardless of which language I'm
developing in, whether it be CF, Javascript, Actionscript, VB or C.
Naturally each language has it's differences. In C it is a bit more
important to stick to the standard, since it enforces data types more
rigidly, making it more important for your code to be self-documenting for
other developers. In javascript or actionscript you have unique objects
available to you that don't have a predefined notation prefix (some examples
would be HTML buttons, HTML forms and Flash Movieclips).
Microsoft has a list of recommended (and practiced) Hungarian notation for C
and VB (which lends itself to CF a little more than C). Worth checking out
if you're unfamiliar or curious:
C: (this article also goes over some history and overview of the notation)
http://msdn.microsoft.com/library/techart/msdn_hunganotat.htm
VB:
http://support.microsoft.com/support/kb/articles/Q110/2/64.asp
Since there is no real standard in CF, I roll-my-own. It's a hybrid of
Microsoft's recommendations for VB, C, and my own style. It is
self-explanatory and descriptive.
I use a roll-your-own notation in my db tables as well:
xxxyVariableName
where x's denote the table name and y denotes the data type (e.g.
dbo.Users.usrvUsername)
The exception to this is ID fields, where I use something like
dbo.Users.UserID
I'm not sure how I feel about applying this method to DBs. I continue to
use it, but I think it's a bit overboard for most database designs. I think
the real value of using this notation in DBs doesn't come out until you have
a gross amount of tables and large, multiple joining queries.
Anywho, I think it's a worthwhile practice. I definitely recommend that
people use it, I find that it makes code much more clear.
---
Paul Mone
Ninthlink Consulting Group
[EMAIL PROTECTED]
http://www.ninthlink.com
619.222.7082
-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 4:51 PM
To: Fusebox
Subject: Re: Hungarian Notation
***************************** Team Allaire *****************************
I use my own notation and find things like qGetUser for a query, nCounter
for a number, bBlock for a boolean (to show a few examples) to be quite
useful. It's self documenting code. I don't go all crazy for int_counter or
intCounter, just a single letter and that's it.
> and make things harder to read?
>
> Fred
>
> ----- Original Message -----
> From: "Paul Mone" <[EMAIL PROTECTED]>
> To: "Fusebox" <[EMAIL PROTECTED]>
> Sent: Wednesday, May 23, 2001 2:12 PM
> Subject: Hungarian Notation
>
>
> > Hello All,
> > I've finally begun reading the Fusebox book. I'm surprised at how much
I
> > like it, I really feel like it's making me a better developer already.
I
> > enjoy the standards and methodologies that are laid down, I look forward
> to
> > putting them into practice.
> > Just out of curiosity, why isn't a form of Hungarian notation
implemented
> > in the standard? It seems like it compliment many of the other
practices
> in
> > Fusebox.
> >
> > Paul
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists