0

Document Your Objects...Dynamically

ColdFusion
We have been working on some some applications using Reactor, and I thought it would be cool to create some kind of documentation tool to read through an object and basically give me the metadata in a form that I could read and print for easy access (since I am cfdump'ing Reactor stuff all the time )


What I ended up with is pretty cool (I think):

I wrote a custom tag that you could pass two one attributes to..Object, and ObjectTitle. The tag reads through that object, writes a Flash Paper document, then embeds it into your browser.

With this tag you could easily have a site dedicated to documenting your Objects and what functions they have, and as you make changes to your object the documents stay current.

Have a look and let me know what you think...(or let me know if you have any ideas for improvements!)

UPDATE (#1) OK, now the tag only accepts the object as an attribute, the name is derived from the object's meta.

UPDATE (#2) Now the Return type is added in the doc, thanks to Mark Mandel for noticing that.

Thanks

cf_wwwObjectDoc
tags:
ColdFusion
Brian Kotek said:
 
 
posted 1289 days ago
Add Comment Reply to: this comment OR this thread
 
Brian Kotek said:
 
Ahh one nice difference is the Flashpaper output.
 
posted 1289 days ago
Add Comment Reply to: this comment OR this thread
 
 
Hadn't heard of that one at Spike.org.uk. I will check it out. Also, the tag now also only accepts one attribute (the object). It's name is pulled from the object's meta.

Thanks
 
posted 1289 days ago
Add Comment Reply to: this comment OR this thread
 
Ryan Everhart said:
 
What is neat about Aaron's tool is the fact that you can intergrate it into you existing application since it uses flashpaper. I think that CFCDoc is a stand alone application. In any rate this is a very neat little tool, thanks Aaron.

Ryan
 
posted 1289 days ago
Add Comment Reply to: this comment OR this thread
 
Dave Shuck said:
 
As recommended by the ColdFusion Weekly podcast! :)

Very cool Aaron... I had FlashPaper documentation for a directory of about 75 objects in under 10 lines of code. Hard to beat that.
 
posted 1286 days ago
Add Comment Reply to: this comment OR this thread
 
Mark Mandel said:
 
This is very very handy for systems that generate dynamic objects - like Transfer. So very nicely done!
 
posted 1282 days ago
Add Comment Reply to: this comment OR this thread
 
 
Thanks Mark, I added the "Returns:" field to the doc per your suggestion.

AJL
 
posted 1282 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Fuelly