Thursday, April 14, 2005

Updated CFC generator for Enterprise Architect

I made two minor changes to the MDG xml file to import into your Enterprise Architect projects. The first was to standardize on true/false instead of yes/no for boolean attributes. I didn't really have any solid reasoning for doing this other than I like the consistency and it makes the code similar to the approach used by other languages (thanks for the heads up on this one, Tracy).

The other change was to utilize the property setter functions in the constructor instead of accessing the properties directly. We have an application that requires a lot of massaging of data for presentation vs. storage that required us to do a bit of preprocessing. The setters take care of it handily and if referenced consistently, avoids having to duplicate code in a few places. If we find that the processing has changed a bit, changing the setter fixes both the setter (which might be referenced in many places) as well as the constructor which is used to sometimes create empty instances.

If you are using Enterprise Architect for your UML modeling, feel free to grab the MDG xml (click to view, right click to save) file I've put together and use it. Let me know if you make any cool changes.


  1. I plan on peeking at this soon... but any chance for reverse engineering w/ EA? I read somewhere that they only support "custom" forward eng.


  2. They currently only support custom forward engineering for ColdFusion (or any other language they don't really know about). There has been some talk of making a reverse engineering processe, but I'm sure it would have to be a custom setup as well.

    I'm not even sure it would work that well generically any way. You can build constructors in cfcs any number of ways. Trying to parse that out and extract parameters or relying on some strange use of cfproperty would be highly error prone and still require a customized routine to deal with your team's personal coding style.