I would say that you should probably treat upload as a verb.

You don't have an upload object, you have an object that has been uploaded, is being uploaded, or will be uploaded.

The object itself is a file of some sort. You could just give it a generic name of file, or you could give it a name that relates to the type of file - imageFile, pdfFile, wordFile etc.

my 2c

Spike

Mark Stanton wrote:
Hey All

Just a quick query on naming cfc's and functions. Does anyone have a
convention for dealing with cases when your keyword is both a noun and a
verb.

The example is "upload", I can perform an upload() (verb) or I can have an
Upload object (noun) which has certain properties that relate to it
(uploadDate, userId, etc...).

Any ideas?

The best I've come up with is:

<cfcomponent displayName="Upload">
        <cffunction name="newUpload">
                <!--- logs that an Upload has been triggered --->
                ....
        </cffunction>
        <cffunction name="finaliseUpload">
                <!--- logs that the Upload has completed successfully --->
                ....
        </cffunction>
        <cffunction name="logUploadError">
                <!--- logs a problem with the Upload --->
                ....
        </cffunction>
</cfcomponent>

Maybe a non issue, but my brain is in Friday mode.



Cheers

Mark


______________ Mark Stanton Web Production Gruden Pty Ltd Tel: 9956 6388 Mob: 0410 458 201 Fax: 9956 8433 http://www.gruden.com


--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/





--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to