I just got an email from another CF developer looking for the CFCDoc tool that Spike and I wrote a while back.  It's still available on Spike's site, but I've posted it here as well.

In a nutshell, it's a Javadoc-style tool for CFCs.  Unlike Javadoc, it doesn't generate a bunch of static HTML files, but instead builds pages dynamically.  That's good and bad, as you'd imagine, but mostly good.  Spike built the original and I've modified it heavily to add inheritance information, abstract/deprecated support, constructor (i.e. init()) support.

One significant differentiator between it and the built-in CFCExplorer tool is that CFCDoc doesn't instantiate your CFCs (which runs the psuedoconstructor) and can have some nasty side effects.  Instead of using the getMetaData() function (which is what requires the instantiation), CFCDoc just reads the raw CFML off the filesystem and parses it to extract the needed data.  I can't say for certain (because I've never tried), but that also it should run exactly the same on your CFML engine of choice, not just CFMX.

To get started, download the archive, extract it, add a path (absolute or relative) to your CFC directory in the config.xml file (there are examples), and then fire up index.cfm in your browser.  And, no, I don't get paid by the PayPal links that are in there.

6 responses to “CFCDoc”

  1. Devin

    Is this still being worked on? I've noticed that if you set the path to the root of your web site and any the cfc's extend other cfc's in a mapping (such as /reactor base cfc's), then cfcdoc errors when clicking any of the cfcs.

  2. Nozer


    What does this application do and how can i get a copy to test?


  3. David Lakein

    I got it to work on BlueDragon 7 (free Server edition), after getting a Java 5 error about ambiguous use of java.lang.StringBuffer.append() — need to JavaCast the strings you pass in.

    Dave Shuck wrote about this in relation to Reactor:

    Problems were in doctemplate.cfm, in the functions at the top; instead of result.append("]")
    use result.append(JavaCast("string","]"))

    Seems to work fine after these fixes.

  4. jax

    Hi Barney

    I have done some improvements on CFCdoc that I like to post back to the open source community. Could you sent me an email to let me know if that's ok or not ?