Joeflash’s Enigmacopaedia


Server Side ActionScript 3.0: Coming to a ColdFusion Server Near You

Posted in ActionScript 3.0, Flex, ColdFusion by Joeflash on the November 18th, 2008

Okay I was going to wait until after MAX to blog about stuff, but this cannot wait: as of about 7:30pm PST, at Adobe MAX 2008 SF, the sneak peeks announced that ColdFusion 9 will have server side ActionScript 3.0 capability. I’ve been waiting for this since Macromedia Comm Server, never mind FMS…

Correction: they didn’t say ColdFusion 9, they said they were working on this for a future version of ColdFusion Server.

You know, Flash Catalyst (aka Thermo) is cool, I mean way cool. And CoCoMo, and the next version of FMS with RTMFP is cool, and Alchemy just rocks the house, and Configurator is nice in a nostalgic kinda way (for me). And Gumbo, well it is definitely cool, but it’s not really news.

I mean, I was blown away enough by the sneak peeks Flash Player Multicast (via RTMFP), Nitro (SWF widgetization), Durango (realtime drag drop HTML/Flash/AIR component mashups), the Content Intelligent Toolkit, MeerMeer (multi-browser realtime virtualization)…

But what did it for me, the whole payoff for travelling across the continent from Toronto to San Francisco to go to MAX, was very last on the list. Server-side ActionScript 3.0, with the next a future version of ColdFusion Server.

If that were it, well, I would think, hey, that’s cool. But it’s how you can do it that totally rocks the house, that’s got me dancing in the streets.

There are three ways, from what I could tell:

1.     ColdFusion tags on the server with ActionScript 3.0 in a <mx :Script> block which generates HTML (and whatever other server-side code I would guess).

This brings the power of AS3 to ColdFusion developers. Combined with the new eclipse-based ColdFusion IDE which can sit alongside any other Eclipse Plugin (like Flex Builder), and CF will be a whole new ballgame.

2.     MXML & AS3 in Flex Builder.

Now you can author your MXML and AS3 in Flex Builder for the client-side code calling a Service operation on the server… written completely in ActionScript 3.0 inside a
<mx :Script> tag, no ColdFusion, using a .sas file on the server.

3.     AS & SAS in the same MXML file in Flex Builder, compiled using the next v. a future version of ColdFusion Server.

This is the one that did it for me, the one that brought home the bacon, oh yeah!!! :)
So now, as a Flex developer, I don’t have to know server-side code to create a service or a remote object on the server. I can just write:

<mx :Application ... >

    <mx :Script runat="client">
    ...

    <mx :Script runat="server">
    ...

</mx:Application>

Update Nov.19,3:30am PST: Sorry if you saw the wrong MXML in the last five hours, wordpress kept trying to correct the invalid XHTML of the MXML tags, but it’s fixed now.

…and I’ve got code running on the client and the server, all in ActionScript 3.0,
in the same file.

WOOHOO!!!

Now I don’t have to be freakin’ Java or PHP or CF expert just to code a backend-enabled Flex app.

Adobe, you frakin’ rock.