Skip to main content
January 31, 2009
Question

CFC or CFM??

  • January 31, 2009
  • 1 reply
  • 643 views
Will someone here please give me a simple explanation of the major difference between a .CFC extension and a .CFM extension? To my understanding which may be wrong, a CFC kind of listens and waits for a post to be sent to it, and then executes a command when it receives a post. I am curious because I am trying to make a page that uses IPN for paypal using code I found here:

http://tutorial23.easycfm.com/

I am not sure whether to write this code as a CFC or CFM extension...My guess is CFC but I decided to post here just to make sure.
    This topic has been closed for replies.

    1 reply

    Inspiring
    January 31, 2009
    cfm's are normal cold fusion pages. It was the only extension available until version 6. If you look at the address bar of your browser, you will notice that this is a cfm page.

    cfc's are one of the ways to have re-useable code. They are also the type of file you would use to write web services so that cold fusion code is available to other systems, like flash, asp, etc. They are also a way to use an OOP approach to your application.

    Write you pages as cfms. If you write functions that you want to be available to more than one page, you can write them in either cfm or cfc files. You just access them differently.