Michael T. Tangorre wrote:

> Variable Naming Conventions
> -----------------------------------
> Query: qryVarName...

I do pretty much the same thing only limit the variable prefix to one
letter (less typing)
- nVarName = numeric
- sVarName = string
- qVarName = query
- etc.

Except in component method names, arguments and properties, for which I
just do
MyFunctionName()
PropertyName
ArgumentName

so that we can interchange them based on needs.  Internal vars are
scoped however, so anything I do cfset var sMyVar = "" would be prefixed.

>
> File Naming Conventions
> -----------------------------------
> act_fileName.cfm // Action Files
> ...

Since I am now using mach-ii I do pretty much the same thing:
- vViewName
- lListenerName
- pPluginName
- fltFilterName

>
> ID Attribute Naming Conventions
> -----------------------------------
> tblSomeId // table ID...

This I do quite differently in a way that at first view seems like an
enourmous pain in the backside but actually provides you with shortcuts
dufing joins as there are no ambigious column names:

- - - - - - - - - -

Table names should be non-plural, same case (UPPER or lower), with
multiple words separated by underscores.

If a database supports multiple applications,
    the table name may be prefixed with a 2 character abreviation of the
application followed by an underscore.

Columns names should be non-plural if normalized, same case (UPPER or
lower), with multiple words separated by underscores.

All columns in a table should use the "Entity-Description-Class" naming
convention whenever possible.

The entity code will be derived from the table name.

Table name    Entity naming rule
word count

1        First letter of the word
        The next two consonants
        If there aren't enough consonants use the next two letters

2        First letter of first word
        Next consonant in the first word
        First letter of the second word

        If the first word is an abreviation or a duplicate entity code
exists
            First letter of first word
            First letter of the second word
            Next consonant in the second word

3+        First letter of each of the first three words

If you run out of consonants use the first available vowel

Examples of "ENTITY"
    WRK - WORKORDER
    HSE - HOUSE
    SAC - SUBSCRIBER_ACCESS
    SBA - SUBSCRIBER_BILL_ADDRESS
    FMT - FC_METHOD

Examples of "Description"
    PROJECT
    SERVICE
    RIGHT_OF_ENTRY

Examples of "Class"
    ID
    CODE
    NAME
    COUNT
    AMOUNT
    STATUS
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to