Getting Started With Code Generators - Part 3
The next step in Project Learn is to evaluate another code generator. This blog post will focus on installing cfcPowerTools, a tool created by Tom Schreck. I'll quote a little from the tool homepage (which is a very nice page by the way - complete with an actual online working demo of the tool):
cfcPowerTools is a productivity tool used to jump start your development effort. cfcPowerTools is a code generator that offers the following:
- generate CFCs from database tables
- generate database table from CFC
- batch generate CFCs from multiple database tables
- generate HTML, FLASH, and XML data entry forms
- supports round trip editing
- getter/setter generation
Like the Illudium generator, cfcPowerTools comes with different templates that can be used for generating your code. The following templates come standard:
- Model Controller
- MACH II
- Concrete
- Simple
- Default
A few differences from the Illudium generator are apparent before even downloading the tool. The first difference is that cfcPowerTools allows for 'managed' code blocks. The blocks are flagged as such and can be regenerated at any time. The second noticable difference is support for mass generation from multiple tables. This would certainly be a timesaver (and something that I'm positive Brian could easily add to his tool).
On to the installation. Like the Illudium generator the install is very easy. Just download the project and unzip to your webroot. No configuration is needed since cfcPowerTools utilizes the ColdFusion admin API - but obviously you'll need your admin password handy. Hit the tool in your favorite browser and enter your pass. That's it.
In my next post will get into the tool and create some code.



I've been having trouble running this application. Ive tried everything to get the PT running but I cant get it to load the my projects. Somehow the browser keeps showing the loading clock and nothing happen. The project never load.
I used FF, IE and Opera and they all keep waiting for the page to load. I can create, edit and modify projects but not load them.
My guess is the ajax use of taconite parsing in the browser is conflicting, not sure!
I was able to uncomment the GetPackages() setEchoDebugInfo() found on line 26 of global.js (cfcpowertools\javascript)to display the error and this is what I get when I click load the project link:
200 OK
<META NAME="ColdFusionMXEdition" CONTENT="ColdFusion DevNet Edition - Not for Production Use."><taconite-root xml:space="preserve">
<taconite-replace-children contextNodeID="ln_Packages" parseInBrowser="true">
<div class="tabMenu">
<span class="active">Packages <a href="/cfcPowerTools/index.cfm?projectid=95664DB9-E018-8B54-320227AA6CC725D3&pagelet=addPackage"><img src="/cfcPowerTools/images/add.gif" border="0"/></a></span>
</div>
<div class="tabContentContainer">
<div id="tabPackageList" class="tabContentNav">
<li id="loadRoot"><a href='JavaScript:GetCFCs("D:/CFusionMX7/wwwroot/pgcfc/","pgcfc");'>[load project root]</a></li>
<li><a href='javascript:GetCFCs("D:/CFusionMX7/wwwroot/pgcfc","D:.CFusionMX7.wwwroot.pgcfc");'><span id="packageD:.CFusionMX7.wwwroot.pgcfc" class="txtBlack11">d:.cfusionmx7.wwwroot.pgcfc</span></a></li>
<li><a href='javascript:GetCFCs("D:/CFusionMX7/wwwroot/pgcfc/_cfcSupportFiles/crud","_cfcSupportFiles.crud");'><span id="package_cfcSupportFiles.crud" class="txtBlack11">_cfcsupportfiles.crud</span></a></li>
<li><a href='javascript:GetCFCs("D:/CFusionMX7/wwwroot/pgcfc/_cfcSupportFiles/library/fckeditor","_cfcSupportFiles.library.fckeditor");'><span id="package_cfcSupportFiles.library.fckeditor" class="txtBlack11">_cfcsupportfiles.library.fckeditor</span></a></li>
</div>
</div>
</taconite-replace-children>
<taconite-replace-children contextNodeID="ln_CFCs" parseInBrowser="true">
</taconite-replace-children>
<taconite-replace-children contextNodeID="zoneContent" parseInBrowser="true">
</taconite-replace-children>
<taconite-replace-children contextNodeID="zoneError" parseInBrowser="true">
</taconite-replace-children>
</taconite-root>
I think is an ajax issue, but not sure!
When I try to get the packages (getPackages.cfm?projectID) I get a parsing error:
XML Parsing Error: no element found
Location: http://localhost:8500/cfcpowertools/controllers/ge...
Line Number 41, Column 1:
Any ideas how to go about it, or work around.
It auto inserts that pesky META that you are seeing which means that your XML is all shot to pieces.
See Stevan Erat's blog entry on this at talkingtree.com:
http://www.talkingtree.com/blog/index.cfm/2005/6/1...
I cant believe the removal of the serial number to get it to work.
Now is working as advertise. Great tool.
Thank you for pointing me in the right dirrection.
And Todd, loking forward for you next Part on the topic!