Got use for cfmxml?
I've been trading emails with Sean Corfield on the Bacfug list today regarding CF8's ability to auto-generate Flex code. We're trying to come up with a real-world use case for when you would actually want to auto-generate Flex code from the server. Given the apparent fact that every time the data changes, a new SWF gets generated, we're at a loss. (Every time your data/content was updated, it would just create yet another used-only-once SWF file, and would keep doing so, until the hard drive fills up.)
Is anyone out there actually using this feature in the real world? Have you done any more than a "hello world" app in CF8, in which you were auto-generating Flex code as part of the output?
Right now, I'm thinking it's a neat parlor trick, but not much else. I would love to be proven wrong.
thanks. nolan





It's also a good way to just get started with the MXML syntax as it requires very little effort to start producing some Flex code.
That's the only way I've used it to this point--as just a developers playground. It's much easier to test a snippet of code under CFMXML than it is to create an Eclipse project and compile the code.
So imagine that you're running an advertising agency and you want to offer a self-service option. The user could run through all the selections, background color, what character they want running about the movie (the cute bunny with the bent ear of course :-p ) , destination URL when the character is clicked, external JavaScript function(s) to fire when a particular element is clicked in the movie, etc., etc. Once all of this is set by the client, then the MXML to do this could be saved into the client's folder and then the code to insert the generated SWF would be placed into a textarea that the client could copy and paste into their pages or send to the web sites that will be displaying their advertising. From there, the MXML would be compiled only once (or not compiled again until the client changes the campaign's settings, such as the URL or the character, or whatever.
While all of that could be done dynamically on the fly within a big ball of mud SWF, having the SWF contain only what is necessary has it's own appeal, such as making it much smaller for the end user, as well as potentially being easier to debug.
Anyway, just a couple of thoughts on what I could use this functionality for.