ICEGen: Part 3 – Directories and Files
During the last two installments of this (I don’t know how many) guide to ICEGen, I told you how to install and run ICEGen with your project. Now that you’ve use it to generate some code for you, I bet you’re itching to find out exactly what the hell it generated.
If you look at the directory that you told ICEGen to save it’s files to, you’ll notice two directories that were created. The first one is an “__ICEGEN__ ” directory that contains a whole bunch of xml files.The only file that you will need to worry about in this directory is the “__Customize__.xml” file. I will tell you everything you need to know how this file in the next installment of this guide. For now just put it aside in your head.
The next directory that ICEGen created was a “DAO” directory. This directory contains a whole bunch of CFCs and a directory called “generated”. You’ll notice, in the “DAO” directory, that there is a CFC for each table in your DSN, for instance if you had an “Admin” table in your DSN, you will have an “Admin.cfc” here. All the CFCs in this directory can be editted directly as they will not be overwritten the next time ICEGen runs.
If you look in the “generated” directory you will see that there are also CFCs that correspond to each table in your DSN. These CFCs are generated automatically with each time ICEGen is ran and are overwritten. The CFCs in the DAO directory above, extend these CFCs. Remeber that the CFCs in the “DAO” directory are the ones that you can edit, NOT the ones in the “generated” directory.
Take some time now and look at the files that ICEGen has genereated and check out all of the different methods available for each CFC. In the next installment we will go over the “__Customize__.xml” file and how you can use it to customize and override the output that ICEGen generates.