I’ve been working on a code generation ColdFusion Builder Extension for awhile –
Hey wait, where are you going? Okay, I know, code generation is so passé, but stick with me here I have some cool stuff for you.
So. Code generation. Okay, I have a ColdFusion Builder Extension named Apptacular. It’s an application scaffolder that builds an application from a database. Pretty standard stuff. But I wanted to do something cool with it.
I started with how I handle overriding. Every scaffolder can create a default application, but where they start to fall down is when you want to override the defaults. A good example of this is form labels. The database field is “first_name” but you want the form label for that control to say “First Name.” Different scaffolders solve this in different ways. I went with the tried and true XML configuration file route. My previous experience with this type of development tells me that people NEVER edit the XML. It’s a pain. Okay, fair enough, but I’m using ColdFusion and ColdFusion Builder. I can create interfaces that allow you to edit your configs without looking at the XML. I’ve done that.
This feature allows me to do all sort of tweaks to the application. I can change label, sort order, and foreign key label fields. I can also change aspects of the application like where the CFCs are stored, how the services are created, etc. It uses XML, but you don’t. (Unless you want to.)
The next thing I tried to do is make the interface for the entire set of configuration tools look a little better than the default. I used the ColdFusion Builder Extension APIs ability to display a URL as an interface to handle this. So I sprinkled in a little HTML, CSS and images to make a pleasing, branded, interface for my extension.
Then I put a lot of work into data modeling correctly. I can detect relationships and build the proper ColdFusion ORM CFCs for it. I can get commonly used items like number of related items.
Finally, there are a lot of little features like virtual columns, authentication, and Flex services that I’ve added. I should have a few videos of this in action for you over the next week.
The code is not quite ready to share yet, but I wanted to get it out there for all to see, and if need be, comment.