15

I have inherited over 600 files of ColdFusion source code running a internal web site for my company. One of my tasks is to "document" it. The code base represents about 5 years of development and there is no technical specification of what it does.

The developers have maintained a change log of each file and there is a consistent header.

My thought is that I can build a dependency map of the various modules and referenced stored procedures to facilitate this documentation by scanning the source files. I have used Doxygen in the past for c++ source code and am wondering if a tool like this exists for ColdFusion.

One output I am investigating is the ability to create a xmind file as means of visualizing the cross dependencies in module inter-relationships.

Thanks in advance,

Chris

Nathan Strutz
  • 8,095
  • 1
  • 37
  • 48
  • "The developers have maintained a change log of each file and their is a consistent header." -- This proves nothing other than the *stated intentions* of the developer! (And that's assuming they always remembered to log changes, etc) – Peter Boughton Mar 27 '09 at 19:28
  • 5 years old. 600 files. What are the chances this is good OO code, all in cfc's, that have hints (metadata), that can be used to generate good documentation? Probably very little. – Mark Feb 07 '11 at 21:41

4 Answers4

11

The ColdFusion server has built in introspection that outputs javadoc like documentation for any CFC class.

See: http://YourColdfusionServer/CFIDE/componentutils/componentdoc.cfm

However, it requires an RDS login/password for your server. For delivery to third parties, I set up a recursive script that does a cfhttp fetch against the docs for each cfc file, and then compiles the pages to PDF with cfdocument.

Adam Cameron
  • 29,677
  • 4
  • 37
  • 78
Jesse Bethke
  • 111
  • 1
  • 2
6

You could start with ColdDoc

Also, heres a UML 2 CFC generator.

I guess what you really need is something to reverse engineer the coldfusion code into uml class diagrams. I don't know of anything off the top of my head.

MagicDraw, Objecteering don't seem to do it yet.

John Ellinwood
  • 14,291
  • 7
  • 38
  • 48
4

After trying to find an answer to this question myself I ended up writing this solution:

ColdDuck

Maybe it is too late for you now but I am just spreading the word.

Murray

Murrah
  • 1,508
  • 1
  • 13
  • 26
  • This is great work! I'm going to try this out and see what I can make of it. Thanks! – Nathan Strutz May 13 '15 at 22:44
  • 1
    You may well be the only other person on the planet that is using it! And I havent looked at it since then either! ;-) So, I hope it works for you. – Murrah May 14 '15 at 05:26
0

Sounds to me like creating your own Xmind or XMI file is the way to go. The XMI file may be more portable between tools, but the last time I looked at doing that the XMI file formats were a bit daunting for the time I had available to work on the solution. If the formatting of the headers consistent is enough to read with ReFind or Find I'd build a script that uses cfdirectory and cffile to walk the code tree and output the file(s).

hofo
  • 522
  • 1
  • 4
  • 16