Skip to main content
Participating Frequently
March 30, 2008
Question

Getting Started with CFC's

  • March 30, 2008
  • 4 replies
  • 607 views
Can someone explain the need/use of ColdFusion component (CFC's)? I have been working on older versions of CF and would like to know what CFC's should be used for.


Is the a link explaining the purpose of them?
    This topic has been closed for replies.

    4 replies

    Participating Frequently
    March 31, 2008
    Inspiring
    March 31, 2008
    quote:

    Originally posted by: biznet11
    Can someone explain the need/use of ColdFusion component (CFC's)? I have been working on older versions of CF and would like to know what CFC's should be used for.


    Is the a link explaining the purpose of them?

    CFCs are one of many ways to create reuseable code in cold fusion. That's one reason.

    CFCs enable you to create webservices. That's another.
    biznet11Author
    Participating Frequently
    March 30, 2008
    Do I understand correctly that 1 use for CFC's is to put a cf query in 1 place so it can be used many times?

    I got an error when I tried to run a test:
    Could not find the ColdFusion Component or Interface test1.cfc.

    I put test1.cfc in a folder called cfc

    cfinvoke >>> component="test1.cfc" - is this wrong?

    How can I fix it?




    cfc>test1.cfc

    biznet11Author
    Participating Frequently
    March 30, 2008
    When I click + under components and create a basic test in a subfolder called 'comp' - I get the error:

    The packs and CFC's within cannot be listed

    1 - URL - ill formed
    2 - url - cf not running
    3 - url - no cfc's on site

    - the rest of the site is working fine
    - BTW: the page does get created in the correct 'comp' folder
    Any ideas to fix this?
    biznet11Author
    Participating Frequently
    March 30, 2008
    Thanks - here's info for others to view

    2 things helped
    - I created RDS - then all cfc's showed in window
    - component="test1.cfc" needed to have the full path like: "testsite.cfc.test1.cfc" - then it all worked
    Inspiring
    March 30, 2008
    > Can someone explain the need/use of ColdFusion component (CFC's)?

    > Is the a link explaining the purpose of them?

    Have you tried reading the relevant documentation, as a place to start?

    --
    Adam
    biznet11Author
    Participating Frequently
    March 30, 2008
    Hi Adam,

    I finally found this and it helped - thanks

    cfcmethodology.pdf
    http://www.adobe.com/cfusion/search/index.cfm?loc=en_us&term=cfcmethodology