The ColdFusion component tags
You can use these following tags to create a ColdFusion Component.
Tag |
Purpose |
---|---|
cfcomponent |
The core CFC tag that defines the component structure. All other content in the component is wrapped within this tag. |
cffunction |
Creates a method (function) within the component. |
cfargument |
Creates a parameter, otherwise known as an argument, to be sent to the function. |
cfproperty |
Can be used to define and document the properties within your component. Can also be used to define variables within a CFC that is used as a web service. |
These previously mentioned tags are written within the .cfc
file that defines the ColdFusion component.
Note
In the world of object-oriented programming, you will commonly hear or see reference to the word 'Class'. A class is essentially a blueprint that is used to instantiate an object, and typically contains methods and instance variables.
When discussing a Class in the context of ColdFusion development, we are basically referencing a ColdFusion component, so when you see or read about classes, remember it is essentially an alias for a CFC.