The amazing adventures of Doug Hughes

I received an extremely interesting tidbit of information from a very authoritative figure at Adobe today. Did you know that ColdFusion 8, when installed with LiveCycle Data Services (which it is, by default) will compile MXML files for you on the fly?

Thats right! You have a complete Flex server included with ColdFusion!

From what I’m told, and I have yet to test this, integration with LCDS “just works” when you use this.

Ultimately, this might hurt performance if you overuse this, so use with caution. That said, from my tests it seems that the resulting SWF is cached and not recompiled on each request.

Ive been asked to give credit for this to Tom Jordal. Thanks!

Comments on: "Did You Know ColdFusion 8 Compiles MXML?" (12)

  1. I heard something about this recently as well, but I can’t find any definitive info about it on the web (code samples or just more details on performance, caveats, etc). Did Tom have a URL you can share or anything like that?

    Thanks,
    Nolan

    Like

  2. Brian Kotek said:

    I recall when this was first announced but I don’t remember where. I do remember though that there was a big caveat that this can, as Doug mentions, create some major performance issues. I think in general this is not encouraged, and that Flex apps should be compiled and deployed directly (usually from FlexBuilder obviously).

    Like

  3. Thanks guys!

    I realize the performance concerns, but there are still valid cases to use this type of behavior. I’ve had a “R&D if this is possible” note on my todo list about this very topic. I’m working on an intranet app that would really benefit from “dynamic Flex” front-ends in a few spots (and performance isn’t as much of a concern as getting certain features a) done and b) impressive looking).

    thanks again!

    Like

  4. Doug Hughes said:

    I tested this today. I simply dropped a Flex helloworld.mxml app in a webroot and tested it. It came up. The first request took a while, the others were quite fast.

    From what I’m told, this is the same thing that Flex 1.5 did.

    Like

  5. Sam – the difference here is that straight up mxml can compile into a Flex SWF. Your example – though cool in it’s own right – used the bootstrap method. Doing it this way you can just hit http://localhost/helloworld.mxml and it’s compiled and the html wrapper is created and streamed to the browser.

    A few issues I noticed – changes to the MXML are not reflected. Must have to delete the cached SWF somehow…

    Also – doesn’t LCDS expire after 120 days if you don’t have a license?

    Like

  6. Doh…you _did_ say it’s cached and not recompiled…I guess my point is – “how can i _make_ it recompile”?

    Like

  7. Raymond Camden said:

    Todd – I’m 90% sure LCDS has a stripped down version that will continue to work.

    Like

  8. Brian Kotek said:

    I’m pretty sure it’s the full version, but it’s the free Express version which is limited to 1 CPU and no clustering. I’m not sure though if it actually limits itself to 1 CPU or if that is just the license that you are supposed to adhere to.

    Like

  9. Douglas Knudsen said:

    nothing shocking, this is part of LCDS, AKA FDS regardless of what J2EE engine it sits in.

    recompiles occur when files change, just like CFML, JSP, etc. Note that if one AS/MXML file changes in the app, the whole app is recompiled.

    DK

    Like

  10. I just spent all weekend hacking together a CF 8 application that does exactly this. The *.mxml does get compiled right on the server. I’m also using the new DataManagement gateway to “Notify the Data Management Services of data changes”. From what I can tell, this gateway is different than the FlexMessaging gateway that existed in CF 7. But I’m still trying to figure out the exact differences. Anyone want to enlighten me???

    Like

  11. Joo Fernandes said:

    Tim, Data Management gateway is to notify LCDS about changes made to items managed by a specific destination. Imagine that you have a cfml back-end app but a Flex-LCDS powered front-end application with real-time data. With Data Management gateway you can notify your LCDS app from changes made in your CFML back-end.

    Like

Comments are closed.

Tag Cloud

%d bloggers like this: