Building ColdFusion components

You use the cfcomponent and cffunction tags to create ColdFusion components. By itself, the cffunction tag does not provide functionality. The cfcomponent tag provides an envelope that describes the functionality that you build in CFML and enclose in cffunction tags. The following example shows the skeleton of a component with two methods:

<cfcomponent> 
    <cffunction name="firstMethod"> 
         <!--- CFML code for this method goes here. ---> 
    </cffunction> 
    <cffunction name="secondMethod"> 
         <!--- CFML code for this method goes here. ---> 
    </cffunction> 
</cfcomponent>