ICEGen: Part2 – Generation
Now that you have ICEGen installed, it’s time to start using the thing to generate some code! Fire up your favorite browser and browse to the directory that you installed ICEGen to. If everything is kewl, your page should look like this:
ICEGen only has 5 settings that you need to give it to start generating code.
1) DSN Name – Enter in the name of the DSN that you have setup in your CF Administrator that you want to generate code for.
2) DSN Variable – Enter the DSN Variable that ICEGen should use to reference the DSN Name within the generated code. This is the value the will go into the dsn attribute of the cfquery tag. It can be anything you want and you must surround it with pound signs.
3) Database Type – Choose the database server type that the DSN resides on. For now ICEGen only supports Microsoft SQL Server. In the future I hope this list grows to include other database servers.
4) Save Project Path – This is where you tell ICEGen what directory you want to save the generated code to. The directory doesn’t have to be created already as ICEGenwill create the directory path if needed. Remember that this setting is relative to the webroot of the project. The path must begin with a “/”. So let’s say you wanted to save the generated code to http://www.mykewlproject.com/mymodel directory; enter “/model” (without the quotes) into the field.
5) Library Path – Enter the library path, relative to the weboot, for the saved generated code. Most of the time, this will be identical to the “Save Project Path” setting. So using our http://www.mykewlproject.com/mymodel directory as reference; we would enter “mymodel” (without the quotes.).
That’s pretty much it, now click “Submit” and ICEGen will start to generate the code and save it to the directory we specified. When ICEGen is finished, you will get the message below telling you that it finished and how long it took to generate the code.
In out next installment, we’ll look at the directories that ICEGen created. Later we’ll start exploring the code.