Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What are .cfc files ??? 1

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Howdy y'all!

Messing around with kalendar and for the first time, I come across (never noticed these before) CFML documents with the extension .cfc.

What are these documents for?

Thanks!

KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
CFC or ColdFusion Components were something that was introduced in CF MX. They are basically a file that allows you to create related functions/web services etc. all within one file, a cfc can be invoked using other tags such as cfinvoke or using the old favourite createobject

Code:
  <cfcomponent>
    <cffunction name="getData" access="public" returntype="query">
      <cfquery datasource="your_datasource" name="something">
        select a, b 
      </cfquery>

      <cfreturn something>

    </cffunction>
  </cfcomponent>

you can also call other cfc functions from other method if you so wish, by using <cfinvoke method="method_name" returnvariable="return_variable" />

With cfc's comes the possibility of using oo programming as well which is always a good thing

Hope this helps!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top