A quick review on Brian Rinaldis code generator
So after my previous post about not being able to get flex running on my local dev machine I decided to give Brian Rinaldis CFC Object Generator (CFCOG, or as Brian likes to call it: Illudium PU-36 Code Generator) a test from another machine, and boy does it deliver.
First of though what is it:
This project generates ColdFusion components (i.e. bean, DAO, gateway, service), ColdSpring XML, Transfer XML, and ActionScript Value-Objects using the admin api and database introspection. The front-end is built in Flex 2. The code outputted for easily pasting or saving into a project to allow you to get a head-start on some of the grunt work of doing OO in CF. It uses XSL to generate the components and is designed to allow you to easily add to or modify the generated code. You can even create new templates that can be swapped out at run-time.
If you have the system
requirements, you install
the application and are presented with an intuitive interface:
To get the app to generate code for you, you simply:
- select the database you want
- select the database table
- select the template type (default, prototype or transfer)
- select your CFC path
- and select a path for your code output (used for saving generated code)
- click generate
You will then get an output in the main area of the screen with your generated
code. In my example I'm wishing to generate code for Mark
Mandels Transfer frameworks and depending on which template type you are
using you will get different tab outputs on the following screen. For transfer
you get four tabs:

- Gateway - This generates gateway for your table object.
- Service - This, as the name suggests generates your service layer (the business logic)
- Transfer - This generates the business objects for the transfer framework configuration file
- Coldspring - This generates the beans for the coldspring framework configuration file
For a default output you will these tabs
- bean - setters and getters
- dao - database actions dealing with a single record
- gateway - returns query results
- service - the business logic
- to - (transfer object) used for transferring static data between objects
- coldspring - Dependency injection framework beans
More information on how to use this app can be found here.
It's worth noting that the code generated is very generic and for it to really benefit you you may wish to customise the code output, read here on how to do just that.. I see the fact that you can customise the code output as one of the strong features for this application. I'm going to work on customization now and i'll let you know how I get on.




