So let me get this straight (just so I've got it in my head - from the very
beginning):

1) To create a component, you use the .cfc ending and put <cfcomponent> in
the page
2) To use the component, you create <cfproperty> and <cffunction> tags,
which are analogous (although not the same as) properties and methods within
an object
3) There is no such thing as a constructor in CFC's.  To "hack" (albeit a
known and recommended hack) then you insert code outside <cffunction> tags,
but inside the <cfcomponent> tags.  This code gets run each time the CFC is
invoked.
4) There is an unnamed scope in the CFC.  If you do not scope your variables
using var, then the variable will be available to that instance of the CFC
throughout all functions.  If the variable is set using var <variablename>
then the variable is ONLY available to that function.

It's hardly a Java (or any other type of) object is it?  I and a few others
in the UK are trying to start a new project using CFC's (it's a blog, but I
suspect that the way it's going will be slightly more open and usable across
other apps) and so I'm just trying to make sure I get it right from the
start.

Design patterns of CFC's would be a useful place to start.  I noticed on
cfczone.org that this was mentioned... Anyone got any further with this?
Would be good to get a site up about that (as CFC's appear to be really
badly used and implemented a lot of the time imho)

Paul
-----------------------------------
Paul Johnston
PJ Net Solutions Ltd
http://www.pjnetsolutions.com
[EMAIL PROTECTED]
+44 (0)7866 573013


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to