Ready, set, CFUnited is a go - ColdFusion 9 Sneak Peaks!

After muddling through the first 30 minutes at the start of an introductory keynote, Ben Forta and Adam Lehman from Adobe really took off during their keynote talking about the future of ColdFusion. This is early sneak peaks, so this may or may not be in the final product and will likely change in syntax and functionality along the way. Here are some highlights that stuck out in my mind:

  • ColdFusion is doing very well; the best since Adobe has taken over the product
  • CF Open Process Initiative - Public bug database and enhancement requests' Customer Advisory Boards: community leaders, focused committess on CFML Language, RIA, frameworks and more; early access to alpha/beta releases
  • Centaur (ColdFusion 9) - advancing CFML, improved integration story, improving the developer experience (more this last point at MAX); integration: especially flex, air, etc.
  • Growing the ColdFusion base (problem of the lack of ColdFusion developers) - [new announcement] ColdFusion will be freely available for students and faculty for academic use, similar to the model to Flex Builder for Education; plus training materials, etc.; product is full unrestricted version; coming soon;
  • Protecting the integrity of CFML (problem of language framentation and inconsistency over the years) - [new announcement] Newly formed "CFML Lnagugage Advisory Committee" to help define the rules and guidelies around the use and evolution of CFML; include Adobe plus outside community leaders (Sean Corfield, Ben Forta [Adobe], Sanjeev Kumar [Adobe], Gert Franz [Railo], Ray Camden, and Rob Brooks-Bilson)

They also gave a plug for the upcoming ColdFusion 9. It looks like it will be released in 2009.

  • Create UDFs and CFC methods using <CFSCRIPT>
    • argument definition and validation, roles, access, return types
    • create CFCs using cfscript
  • Explicit LOCAL scope keeps local variables local
    • <cfset LOCAL.var=1>
    • using "var" still works
    • var statement can be used anywhere within function
  • default settings within a CFC (so all variables will be scoped within that setting)
  • New tag: CFFINALLY - always runs, located right after a <CFCATCH>
  • New tag: CFCONTINUE - brought in from cfscript; sends back to top of loop without breaking out of loop
  • new and import keywords: creating components
  • implicit constructors: <cfcomponent init="functionName">, or method named init(), or a method with same name as component
  • implicit getters and setters using <cfproperty> attributes; hand-written methods overwrite implict methods
  • new server.cfc file with OnServerStart and OnServerEnd; one per instance; all applications inherit from it
  • Centaur will make AIR integration easy
  • New Flex-CF integration - import com.adobe.coldfusion.*
<cf:DataSource id="myDs"
dataSource="cfartgallery
offline="
true"
valueObject="
com.adobe.demo.artgallery.Artist">
<cf:Query name="create" sql="INSERT INTO artists..." />
<cf:Query name="read" sql="SELECT * FROM artists where artistid="@artistid" />

...
</cf:DataSource>
  • When online, it will update the CF datasource directly; when offline, it will update a local SQL Lite copy, then sync when the app goes online again--cool stuff!
  • Databases will have an integrated ORM using 100% hibernate using CFCs
artist.cfc:
<cfcomponent orm="true" datasource="cfartgallery"></cfcomponent>

index.cfm:
<cfsript>
hibernate=request.getORMSession();
artist = hibernate.getById(33, "com.adobe.demo.artist");
artist.setFirstName("Mark");
artist = hibernate.save(artist);
</cfscript>
  • That's all you need! CF will draw the table name from the name of the CFC.
  • it will generate hibernate XML behind the scenes
  • it will also add table columms on the fly based on new cfproperty tags and attributes
  • they will somehow integrate cfquery with this ORM technology to be able to go back-and-forth between the two (if I understood them correctly)

All-in-all some very cool stuff. Thanks for the demo guys!

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Hmmmm "new" and "import" for CFC, now we are TALKING here
# Posted By Raul Riera | 6/18/08 2:16 PM
"Explicit LOCAL scope keeps local variables local"

Ha. I always begin my CFC functions with "var local = StructNew()" :-)
# Posted By Simon Wright | 6/18/08 9:45 PM
@Simon:

I've done that SOME, but certainly not everywhere. I have a developer using the varscoper tool to check all our cfcs right now. We apparently missed some var-scoping along the way :-) This will help alleviate those issues.
# Posted By Mark Mazelin | 6/19/08 8:28 AM
"default settings within a CFC (so all variables will be scoped within that setting)"
Ace, finally ! I can just use <cfset> to create a new variable, and not have to run everything through varscoper, or remember to use a 'local' struct/scope, to avoid blowing my own foot off. I think ?
The auto on/off line sync stuff has been begging to be added, given Adobe's BlazeDS project. I'm not sure most Flex apps will use it (SQL in the view layer == bad) but for AIR it's going to be great.
# Posted By Tom Chiverton | 6/20/08 6:54 AM
"new" ... Is that going to work anything like javascripts "new"?

new Object()

My ears are perked.
# Posted By Acker | 7/10/08 1:42 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.