May 5 2007

Cx: ColdFusion 2012

Posted by Joe Rinehart at 10:37 AM
8 comments
- Categories: ColdFusion MX

Last night, Adam Lehman asked a group of us (myself, Chris Scott, Brian Kotek, Rob Gonda, and David Perez) what we'd like to see from ColdFusion given nothing but our imagination and a blank slate. I'm not going to be able to properly represent ideas from all of us, but I wanted to outline a core idea that came up: the idea of an almost entirely new Adobe application server building on the spirit of ColdFusion and current Adobe technologies. In my head, I nicknamed it Cx.

Here's what I'd love to see:

A rewrite of ColdFusion using an XML schema to create view scripts (.CXM) and components/clases (.CXC), and allowing inline scripting (in the theme of cfscript) and component creation in AS3.

How would it work? Let's start at the top, a simple query and display:

<cx:Template xmlns:cx="http://www.adobe.com/cxml/2012">

<!-- Function to layout pancake name -->
<cx:Script>
<![CDATA[

private function pancakeName(name:String):String {
   return uCase(name);
}

]]>
</cx:Script>

<cx:Query name="pancakes" datasource="breakfast">
   SELECT * FROM pancakes
</cx:Query>

<table>
<cx:Output query="pancakes">
   <tr>
      <td>{pancakeName(pancakes.name)}</td>
   </tr>
</cx:Output>
</table>

</cx:Template>

Now, a custom tag / component to display a pancake icon beside the name, stored in {project}/customtags/PancakeName.cxml:

<cx:Template xmlns:cx="http://www.adobe.com/cxml/2012">

<cx:Property name="name" type="string" />
<cx:Property name="icon" type="string" />

<cx:Output>
   <img src="images/{this.icon}" />{this.name}
</cx:Output>

</cx:Template>

Using it in our display in our custom namespace:

<cx:Template xmlns:cx="http://www.adobe.com/cxml/2012" xmlns:customtags="customtags.*">
...
   <td>
      <customtags:PancakeName name="{pancakes.name}" icon="{icon.name}" />
   </td>   
...
</cx:Template>

Lastly, two takes on modeling a pancake:

<cx:Component xmlns:cx="http://www.adobe.com/cxml/2012">

<!-- You get the idea... -->
<cx:Function name="getName">
</cx:Function>

</cx:Component>

Or in AS3:

package model {
   public class Pancake {
      public var pancakeId;Number = 0;
      public var icon:String;
      public var name:String;
   }
}

How would it work?

Honestly, no idea. I'm just tossing out how I'd love to work.

Business implications

I like the idea. I think it'd require a new name and a rebranding of ColdFusion, but this could be done in a way that still relates it to the CF community while appearing a "new" product to others. It could consolidate resources inside Adobe: AS3 would become an underlying language for both server-side and client-side languages.

Wish I knew how to write languages.

Comments

Rick O

Rick O wrote on 05/05/07 1:10 PM

Looks like JSP redone with AS3.

I'm not saying this is Good or Bad, just thinking out loud.
Rachel Maxim

Rachel Maxim wrote on 05/05/07 3:51 PM

I like it, the structure seems really clean and the syntax less arbitrary. And I love the idea of writing AS3 (although it will probably more like AS8 in 2012...) within ColdFusion. I think you're right about how it would improve perception - different enough to change CF's image, similar enough to have a moderate learning curve, and better overall.
Derek P.

Derek P. wrote on 05/05/07 5:07 PM

Its Derek Perez! :P

anyhow, I think this is a really fascinating design, as discussed....we can dream, right?
Cliff Meyers

Cliff Meyers wrote on 05/05/07 8:59 PM

T o me, the value of ColdFusion has always been in the features while the syntax has always been sort of ugly and a liability. The value of CFML itself continues to decline for me. Off the top of my head, here's two ways they could go:

- Let CF evolve into a true &quot;Java productivity layer&quot; that could be leveraged easily from native Java or any JSR-223-compliant scripting language (BeanShell, Rhino, JRuby, Groovy, etc), then make CFML just another option in that mix.

- Provide some kind of AS3-tie-in so that the programming model between Flex and CF is more consistent.

Look at what Microsoft is doing with the .NET runtime and Silverlight: allowing a developer to choose their language (C#, VB.NET, Ruby, Python) and then leverage it against a common runtime. Pretty cool. I think that's where things are headed in the future. Adobe really needs to get their act together by making CF and Flex play together nicely and allow for a common programming model from top to bottom.
Steve Nelson

Steve Nelson wrote on 05/06/07 4:14 AM

I don't see where you're going with this cxm file. Where's the benefit to creating yet another language on top of CFML?
Baz

Baz wrote on 05/07/07 1:36 AM

Using the AS3 spec for cfscripting sure does make sense - it removes another set of syntax u'd have to learn and makes the jump to flex that much easier. Nice use of namespaces for custom tags too - cfimport ain't pretty.

Besides that, it's not such a giant leap. If you replace all the &quot;cx:&quot; with &quot;cf&quot; and &quot;{&quot; with &quot;#&quot; you are right back to a straight up coldfusion.

I like it, but I'm not sure it's worth the costs of a revolution.
Dan Wilson

Dan Wilson wrote on 05/07/07 11:21 AM

If, for example, I could add another namespace and subclass the cx:function tag, I can see a lot of power in that.

Certainly better cfscript support would be welcome in quite a few circles. I can see an AS2 syntax working with ColdFusion, maybe not necessarily AS3 due to the strong typing features of the language.

It is an interesting idea and one that should be contemplated over a few beers some time.


Hope your trip back home was uneventful. I was treated to a 3 hour back massage by a six year old with ADD. So much for sleeping on the plane....


DW
Jim Ruzicka

Jim Ruzicka wrote on 05/09/07 10:16 AM

Although it's important that Adobe continues to work on improving server software, I think a great help to the ColdFusion community, would be for Adobe to invest heavily in open source projects.
This will become a forever growing deciding factor for potential new customers. By 2012, I would like to see Cold Fusion catch up or even pass the php community in available open source projects! It is a very large goal, but that's what we need.
As a die-hard CF developer, I find it difficult to pass up on all the freely available php projects when creating a new site.

Write your comment



(it will not be displayed)