Go to content Go to menu

Ever since my work with ColdSpring got more and more complex, i’d always felt a bit put out by the fact that as the ColdSpring.xml files grew larger, the greater the pain in the fundament* to track down relationships between beans, especially after being spoilt rotten by the graphical beanmap renderer in the SpringSource Tool Suite for Java Spring. I DID manage to get it to work (after a fashion) for ColdSpring.xml files after mucking about with DTD files, but i managed to murder my STS installation in the process, prompting a re-install…


ColdMap Thumbnail
Click here for larger image


But there's more

At the time of packaging, I didn’t have access to reasonably complex examples due to the private nature of most of the projects involved, so I scoured the web to see if I could find some complex open source projects that could properly illustrate the features of the mapper. I’ve got the image renders of 2 simple ones and one really complex below:

The last example illustrates why I added the feature to allow selecting/unselecting certain beans from the render!

Ok, go and grab a copy of the zipfile here. Unpack it and move the internal coldmap/ folder to somewhere on your webroot. Inside Application.cfc, change the setting:

application.cmapDefaults.serverType

to “win” or “nix” depending on your server type (Windows or Linux)

If you want to view the examples, open config.ini and alter the paths to the samples folder in this setting:

config_files

And thats it!

Surf to http://[yourservername]/coldmap and happy viewing.

More Information

All settings go in the config.ini file supplied in the root folder of the mapper. You can look at the supplied config.ini for examples. For each ColdSpring map you want to track/render, you need to create a section name with a few attributes on how you want it to display.

The format is:

[SomeColdspringAppName]
config_files=List of FULL PATHS to ColdSpring.xml files, separated by a comma (this is to support the ColdSpring <import /> tag)
canvas_size=large, medium or small
canvas_back=Some web hex colour
title_data=Up to THREE lines of documentation to be rendered in the bottom left corner, separated by a comma

OR

[SomeColdspringAppName]
config_files=List of FULL PATHS to ColdSpring.xml files, separated by a comma (this is to support the ColdSpring <import /> tag)
width=Custom width in pixels of map (To support larger maps)
height=Custom height in pixels of map
canvas_back=Some web hex colour
title_data=Up to THREE lines of documentation to be rendered in the bottom left corner, separated by a comma

If you add/remove config.ini settings/groups, you can refresh the app by appending ?refresh to the URL.

Play around with the settings and see what works. The colours of the lines are generated randomly, but using a high contrast algorithm to ensure that the lines are (usually) clearly visible against whatever colour of background you use.

Works on Coldfusion 8/9, Windows and Linux. Supports property references and constructor args as well as AOP interceptor references. Does NOT support autowiring (yet) as the buck stops with the ColdSpring.xml file. We don’t autowire in-house in ColdSpring on principle to aid in documentation, so there was no motivation to do this. Might add it at some point in the future when i have time, or if anybody wants to have a go, feel free and go to town on it. Does not currently work in Open Bluedragon due to the lack of support for pure cfscript based cfcs. I’ll get round to converting this at some point… anybody let me know if Railo works?

*The ColdBox Framework is the Copyrighted works of Luis Majano and Ortus Solutions. Transfer is a powerful and easy to use alternative to the Hibernate ORM
** MuraCMS is a powerful open-source CMS which used ColdSpring in it’s core development