Earlier this week Michael Gillespie pointed me to an interesting program, Visustin. This program creates flow charts from source code. It supports 36 different languages with ColdFusion being one of them. It is primarily supported on Windows only, but apparently can also run on the Mac. (I didn't get a chance to test that.) I have to say that I didn't put much faith in this. I can't remember the last time I used a flow chart nor can I remember ever actually creating one, but I gave Visustin a quick try and here is what I saw.
To start off with - I took a fairly simply program.
<cfloop index="x" from="1" to="10">
<cfoutput>#x# doubled is #doubleit(x)#<br/></cfoutput>
</cfloop>
<cffunction name="doubleit" returnType="numeric" hint="Doubles values">
<cfargument name="x" type="numeric" required="true" hint="Value to double">
<cfreturn arguments.x * 2>
</cffunction>
As you can see, I've got a UDF and a loop that calls it 10 times. Here is what Visustin produced:
Not too bad. But changing the UDF to script produced a less useful chart:
I questioned them on it (and let me say - the company, Aivosoto, was pretty darn responsive) and they said they don't currently support cfscript. That's a downer - but on the flip side - those of making heavy use of cfscript in our CFML are probably in the minority still. Here is another example, taken from the CFM I built for automating watermarking in ColdFusion:
Interesting. So would I use this? I don't know. I've worked with some pretty gnarly code before. If this could create a nice reference, it would certainly be useful. Thoughts?
Quick PS: I mentioned how responsive Aivosoto was - I noticed on their contact form that they asked about languages you use. I also noticed they didn't list ColdFusion. They promised to fix that soon. :)
Archived Comments
I looked at this too. The cost both seems reasonable and high. I ran this against some old 1000+ line procedural CF and was kinda a mixed bag.
Possibly with more time with it, could see it being useful when wanting to refactor old code. Would love to hear from some CF developers who use it.
How are they dealing with calls to cfcs, webservices etc... ? Okay, I'm lazy, I could just try :-)
I am not sure I could come up with a great use-case for this; but, it's cool to see code in a different format. I suppose if you look at other people's code, this is a nice visual way to get comfortable with the abstract workflow before you dive in.
It looks quite interesting. I went to the site and it claims that it not only handles flowcharts, but UML. If so (and I'll be checking it out real soon), it could be quite useful in development.
This would be a good view to have inside of cfbuilder maybe like some other folks said especially if your debuggung other peoples code (or even your own old code!)