by Howard Owens
I just read an article by Ben Forta recently on the subject of WHEN NOT TO USE Cold Fusion (in the most recent CFDJ, I believe).
Good advice.
If you know another language to program in.
I imagine a lot of CFers are like me. We're really not programmers.
I know just enough Perl to be able to pretty much read a script and understand in general terms what the script is supposed to do. But ask me to write anything beyond "Hello, World" and I'm lost.
I'm pretty jazzed at getting CF to perform some acts today that I previously tried and failed on with Perl.
What I'm doing is parsing a directory of directories. Each directory contains a file that mimics the directory's name with an .shtml extension. Those files are menus for all of the pages in each directory. What I need to do is write the contents of all of those menu files to a directory where they will become includes on a master index page for the site. This function needs to be run daily. The first part, finding the files and writing them to another directory, was pretty trivial. The hard part of getting my chops around a RegEx that would change the file paths from same-directory relatives to absolute paths (each one different for each section of the site -- we're talking 30 directories on a daily basis, each with a different absolute file path).
It took me a couple of hours, but I got it figured out.
So now I'm over the hump on writing this application.
I just wanted to say, "CF rocks."
"Real" programmers may have a more expansive choice of programming languages to help them chose just the right tool for a particular job, but I'm becoming more convinced every day -- as my CF skills grow -- that there probably isn't much of anything you can't do in CF. It just takes a little imagination and determination.
(Originally posted to the CF-Community list. Thank you, Howard.)