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

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Dan G. Switzer, II's Gravatar While I agree finding production uses for this feature are not going to be very practical (since you as you stated any dynamically generated contents requires recompilation and a new SWF,) I do find it useful when tinkering around and just wanting to try an idea in Flex quickly.

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.
# Posted By Dan G. Switzer, II | 12/15/07 8:15 AM
Nolan Erck's Gravatar True, and I've used it for that a little (very little) too. But IMHO that still falls into the "parlor trick" category. It's not something I'd release to a production server. I may be out of luck on this one. :)
# Posted By Nolan Erck | 12/15/07 12:58 PM
Sean Corfield's Gravatar I'll definitely be interested to see if anyone comes up with a good answer. Googling for the cf-bootstrap-for-flex.jar file only turned up half a dozen mentions so I'm guessing no one is using it...
# Posted By Sean Corfield | 12/16/07 9:05 PM
Danilo Celic's Gravatar While I'm not using it, one thing I could see potentially using this for would be to generate the SWFs for advertising dynamically based upon input from the user.

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.
# Posted By Danilo Celic | 12/18/07 9:40 AM
 
BlogCFC was created by Raymond Camden. This blog is running version 5.9.003. Contact Blog Owner