Another hint on ColdFusion 9?

This post is more than 2 years old.

During the keynote at cfObjective, Jason Delmore had a slide up for maybe 30 seconds or so. He hinted that something special was up there, although it was disguised to most as pseudo-code for fun. Looking at the code, and taking Jason's hints - it leads you to think that you may be able to fully develop CFCs with cfscript. I.e., a 100% script based CFC. Possible CF9 feature?

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Raul Riera posted on 5/2/2008 at 11:19 PM

Im guessing people wnat this to have OPTIONS right? because, why have both type of scriptings? Stick to tag based syntax and just trow us more tags :) (and yes, I am a very much "why" guy)

Comment 2 by Rick O posted on 5/2/2008 at 11:53 PM

If that is the case, I totally call dibs. I predicted it almost exactly a year ago:

It's about time.


Comment 3 by Allen posted on 5/3/2008 at 12:18 AM

I'm the opposite. I'm at the point where I want Adobe to let me do all of my CF code as "cfscript" that is unless I'm specifically mingling my CF code with javascript or html. Come on, let us have .cfs files!

Comment 4 by Dan Roberts posted on 5/3/2008 at 12:26 AM

*crosses fingers for a <cfdo> tag*

Full cfscript support would be great. The only reason I don't use it much anymore is that it can't do everything yet, and there is no speed benefit unlike CF5. Otherwise I would be using it 100% outside of views.

Comment 5 by Peter Bell posted on 5/3/2008 at 3:54 AM

I noticed that at the keynote and I'm REALLY HOPING to get all cfscript syntax. The tag based syntax makes no sense for writing cfcs.

Comment 6 by Dale Fraser posted on 5/3/2008 at 4:09 AM


CFC's should support a script format perhaps CFS extension, and everything in there is script.

They would also need to add script support to some of the main tags, like <CFQUERY etc.

Comment 7 by Tony posted on 5/3/2008 at 4:26 AM

Yeah -- why don't we just get rid of tags altogether and do everything in scripts -- then we can be just like PHP! ;-)

Comment 8 by Allen posted on 5/3/2008 at 5:00 AM

Oh now that's just getting down right nasty, Tony! :p

Comment 9 by shag posted on 5/3/2008 at 6:28 AM

it would be nice to have some good documentation for cfscript as well.. i remember having to hunt and guess how code inside of cfscript. it was hard to find really good documentation on how to implement functionality within cfscript.

Comment 10 by Russ Johnson posted on 5/3/2008 at 7:44 AM

Toss the CFSCRIPT and add ActionScript3 parsing to the CF Engine... Writing CFC's in pure ActionScript, now that would be sweetness!!

Comment 11 by Dale Fraser posted on 5/3/2008 at 5:58 PM

I would love to see that also

<cfscript language="ActionScript" strict="true">
private var name:String = 'Dale';
private var employee:Query = new Query();

employee.statement = 'select * from employee where name = %1';
employee.setParam(name, 'String');

for (var i:int = 0; i++; i < employee.result.recordCount) {
writeOutput('Hello ' + employee.result[i].fullName);

Comment 12 by Dale Fraser posted on 5/3/2008 at 6:10 PM

I don't think they should drop the tags, but they should add full script like other languages and ideally make it ActionScript.

I give a talk on using ColdFusion and Flex together, now its a very easy to do this, recently I had a Flex guy there who was using PHP backend. He was saying, wow how easy is that, I should be doing my backend in ColdFusion. So this is good, getting new people into ColdFuion.

What would make this the first and obvious choice for these types of people is if ColdFusion supported ActionScript. Great I only need to know one language and i'm away.

Hmmm, I wonder could ColdFusion be rebranded in the future ActionScript Server :)

Comment 13 by John Farrar posted on 5/4/2008 at 7:35 PM

@Paul... learn Flex / Actionscript and you will start to understand. Or learn JS and DOM and that might help. CF started (in some peoples opinion) a good thing with version 5 and script. Yet, the feature set has always been limited. This means the full argument for the benefits (not exclusive use) of script cannot be made. We do get more and more with each version and the arguments are getting better as the script gets better.

@Dale... I think there is still a good place for tags. Uniquely the concept that CFCs are not a place where you should require tags is a good thing IMO. Tags are great for view based logic.

Comment 14 by Pete Freitag posted on 5/5/2008 at 4:36 PM

@shag in regards to CFSCRIPT documentation, I put together a cfscript cheatsheet you might find handy:

Comment 15 by Andrew Scott posted on 5/5/2008 at 4:41 PM

I have heard the argument about actionscript in Coldfusion far too many times, and the fact of the matter is that in my personal opinion it is overkill.

Coldfusion is a scriptin language compiled to java, and in my expereince it would be far easier to adopt the JSP scripting language or Java style rather than a hashed version of something that adds more complexity.

In Dales example I would prefer to see this instead

private String name = 'Dale';
private Query employee = new Query();

//Although from Dales example this would be a struct not a query object
employee.statement = 'select * from employee where name = %1';

employee.setParam(name, 'String');

for (var i:int = 0; i++; i < employee.result.recordCount) {
writeOutput('Hello ' + employee.result[i].fullName);

I am fully against Actionscript in Coldfusion, I believe it is better to adopt a more logical method that is more common in JSP, Java and .Net than go with something that was pulledout of hat just to be different.

And besides, going more like Java means no preprocessing and less translation.

Comment 16 by Yaron Kohn posted on 5/6/2008 at 6:37 PM

It would be nice to be able to use cfqueryparam outside of the cfquery while creating dynamic SQL.

Comment 17 by shag posted on 5/7/2008 at 8:37 AM

@pete, thanks I think i did stumble across that when i had started using cfscript. it was a great help, but i was looking for more info on the cfml things like query and such.

does charlie have this listed on his resource list? i took a look, but i didn't see it.

Comment 18 by John Farrar posted on 5/7/2008 at 4:47 PM

OK, it seems a group of developers who do CF and Flex love ActionScript even more than CFScript. (Considering the CFScript is not feature complete would just top the list of explaining that problem.)

Second on the list would be a consensus that it should be as easy to communicate with Flex from CF as it is to communicate with a database. Just adding ActionScript will not solve that issue. That will have to be added if they use ActionScript or if they complete CFScript.

? Have I missed any major points here?

Comment 19 by CF Ent Developer posted on 3/17/2009 at 5:05 AM

still doesn't cover the critical stuff its missing. Seems like the odd number versions are always very light.

Here are some things CF 9 needs badly:

- CFIIS - Finally give us some site creation automation control. This should have been in 6 and every year never seems to make it.
-Expand CFExchange giving access to setup and manage accounts not just use them. Another automation tool CF lacks. I wonder how many developers building big systems out there want to have to manually key in every request to make a mailbox.
-CFDeploy, another huge automation feature that doesn't exist. This takes a zip file deploys it to a specified location AND can automaticly can set application variables to make the site useful in an automated envirnoment.
-Force Flash to add the Flash Remoting libary back into Flash so developer can use CF web services in their apps again. It assumes quite a bit to think everyone uses Flex or is willing to use AS2 and take a huge performance hit to use Flash Remoting. This is one of the worst release decsions I've seen ever.

With out these features any upgrades for CF are worthless to me

- CF8 Enterprise Developer

Comment 20 by Raymond Camden posted on 3/17/2009 at 5:09 AM

1) CFIIS: Doesn't IIS7 use XML based config? If so, you could do this with CF now. I don't really see that many people wanting to manage IIS via CF, but, what do I know. ;)

2) CFDeploy: Could be interesting. Ant does most of this for you. I see this more a tool for Ant than CF.

3) You've lost me. CF ships with Flash Remoting. It is NOT specific to Flex. It works just fine in Flash. Actually, I remember doing the testing for that in the last CFWACK so I _know_ it should work. Unless I'm misreading you?

Comment 21 by Same guy posted on 3/17/2009 at 5:15 AM

oh and one more thing, remove that stupid logic that says you can't nest a CFmail query loop inside of CFLOOP. There is such things nested loops, and many of the params in CFmail must be dynamic and may require some condtional logic based on the query in the mail tag.

I really feel like CF is losing touch with its developers needs.

Comment 22 by Raymond Camden posted on 3/17/2009 at 5:19 AM

Odd - the last two comments are from people too ashamed to state their names? Are you worried about the CF Posse or something? ;)

@SameGuy: You've lost me. You want the mail tag params to be dynamic based on a query or a loop? Maybe you can show a simple example? Also, have you reported these issues? If you don't report a bug, Adobe can't fix it.

Comment 23 by Shawn posted on 3/17/2009 at 5:43 AM

1. I'm building an online service with CF8 Ent now and I've been searching high and low for ways to automate site creation for trial/paying users. There are a couple of questional custom tags out there, and they all go well out of the scope of XML to get the job done. I'm also on IIS 6. Specially since I'm an enterprise developer, I really expect CF to cover me on being able to automate processes. After all thats what programming is all about. Right now its a HUGE hole in our app. If CFIIS was the only feature in CF9, its enough for us to upgrade. Its that important to our project.

2. Yeah there are tools out there, but like CFImage, its time to get with the times. Some things just make sense to have in there.

3. I've been searching since AS3 release for Flash Remoting solutions for Flash CS3/4. After so much searching and I've had encounters with many other developers with the same gripes that claim the reason it doesn't work is the libaries don't exist and thats why the same classes that work in Flex don't work in Flash. I have CF8 WACK all 3 books, and it covers it in the Flex sense, it does not crack an .fla and show you how in AS3. All the demos seem to be like this everywhere, and it has a lot of devlopers frustrated. There are a couple that haven't, but they also don't work.

Outside of the automation tools and the Flash issue, which I think is Flash after talking with the dev team at MAX, CF has been great for me until I got into complete automated site deployment and management.

I dropped my real e-mail this time. Let me know if you know of anything that can help me out in that department.

Comment 24 by Raymond Camden posted on 3/17/2009 at 5:49 AM

1) Well, I guess then file a request for it. Seriously - Adobe pays attention to the form and will at least process it.

3) Maybe I don't quite get your issue here then. I remember working on a chapter for the WACK that did a quick FR test using a simple FLA to show movie titles. It has been a while, but I seem to remember. Flash Remoting, as far as I know, has NEVER been Flex only. FR _predates_ Flex, so I'm not sure how it could be.

Comment 25 by Ben Forta posted on 3/17/2009 at 6:06 AM


FYI, in CFWACK back in CFMX days we did indeed have a chapter on using Flash Remoting and ActionScript to connect to ColdFusion from Flash. That was before Flex days. Since Flex was released most ColdFusion coverage has moved from CF/Flash to CF/Flex because, well, Flex is typically more appealing to coders like CFers. The same CFC calls via Flash Remoting can be invoked from Flex or Flash, at the end of the day it's the same Flash Player. But, yes, there is going to be far less content out there on using Flash versus Flex.

--- Ben

Comment 26 by Shawn posted on 3/17/2009 at 6:12 AM

1. Thanks, that would help us out drastically to have that in there, and I'd trust it a lot more coming from Adobe than some developer I don't know.

2. didn't get a response on this one :) so it made the cut?! Between 1 and 2, that means our new app as complex as it is, it can be completely built and automated from CF and that makes me happy and says a lot about the platform.

3. Yeah, from my experience even though they should be interchangable, they aren't. At first I thought maybe I was crazy and just wasn't finding it, but then as time went on I found a lot of people with the same issues and at MAX I asked a lot of questions and Adobe developers wouldn't confirm or deny, all I got was "NetConnection has to be reworked in a future version of Flash."

PS - Yeah I was a closed Beta tester for CF8 and x64 and I didn't want to get my app shot down for Centaur cause they know I'm bringing all the automation complaints.

Comment 27 by Shawn posted on 3/17/2009 at 6:14 AM

Ben it was in AS2 :( I have that 1 too.

We have to use AS3 (AVM2) in all our apps. They usually involve video and are way too CPU intensive to downgrade to AS3

Comment 28 by Ben Forta posted on 3/17/2009 at 6:25 AM

Correct, that was in AMF0 days.

--- Ben

Comment 29 by Shawn posted on 3/17/2009 at 6:46 AM

Also to comment on Flex/Flash and Coldfusion. I've been a Flash developer since 1999 and a CF developer since 2001. Flex is pretty good on the CMS side, and to mimic that in Flash would be a lot of work so, I do agree Flex is something to be excited over, but our client's require way too much customization on their projects and Flash is that ultimate tool for building "whatever" they need down to the pixel, and CF is our data component to it. Its really important that Flash keeps its flexibility in that regard, so I hope the community doesn't leave it behind.

Thanks for all the interaction by the way.

Comment 30 by Ernest Breau posted on 8/9/2009 at 9:40 PM

In response to the person with the CFIIS request. THis is what we use now and since cf 6
<!--- loop through IIS servers --->
<cfloop list="#IIS_Server_List#" index="IIS_Server_Name">
<!--- CreateIIS --->
<cfif form.CreateIIS>
<strong>Creating IIS Website on [<cfoutput>#IIS_Server_Name#] - #form.domain#</cfoutput></strong><cfflush>
<cfquery name="qry_UpdateTask" datasource="Tasks">
UPDATE tbl_Tasks
SET task_status='Creating IIS Website on [#IIS_Server_Name#] #form.domain#'
WHERE ID='#url.taskID#'
<cfquery name="qry_InsertTaskHistory" datasource="Tasks">
INTO tbl_TaskHistory(TaskHistory_taskID,TaskHistory_Status,TaskHistory_CreateDate,TaskHistory_BenchMark)
VALUES('#url.taskID#','Creating IIS Website on [#IIS_Server_Name#] #form.domain#',GetDate(),DateDiff(ss,#benchmark5#,#benchmark6#))
<cfset benchmark7 = Now()>

ARGUMENTS="c:\mkw3site.vbs -c #IIS_Server_Name# -v -r #form.drpath# -t #form.domain# -o 80 -h #form.domain#,www.#form.domain#"
<!--- <cffile action="READ" file="e:\a\admin\#form.domain#.txt" variable="outfile"> --->

<!--- /CreateIIS --->

<!--- Add virtual directory to IIS --->
<cfif form.CreateIIS>
<strong>Creating IIS Virtual Directory<cfoutput> [ #form.domain# CFIDE C:\Inetpub\wwwroot\CFIDE ]</cfoutput></strong><cfflush>
ARGUMENTS="c:\WINDOWS\System32\iisvdir.vbs /create #cgi.server_name# CFIDE C:\Inetpub\wwwroot\CFIDE"
<cffile action="READ" file="e:\a\admin\#form.domain#_vdir.txt" variable="outfile">
<!--- /Add virtual directory to IIS --->