I’ve been told now by several people that they wished they could have made it to last night’s joint meeting of the Philly CFUG, Flash, and Flex user groups, and it’s not even 9:30; so I figured I would share my notes from the meeting and some thoughts on them. Some of this stuff has already been announced, but it was covered in more detail at the meeting so I’m including it anyway.
Adam Lehman was the speaker, and as always he did a great job.
Flash Catalyst, Flash Builder, etc.
Adam started off with a quick discussion on what Flash Catalyst is — elevator pitch: It takes the vector graphics from your design apps like Fireworks and Illustrator and converts them to MXML, and enables “round-tripping” between Flash Builder and Fw/Ai/etc. I had heard of it before, but knew it was something for designers, which I most certainly am not, so I hadn’t paid much attention to it previously. I still don’t think I’ll use it, but it’s definitely impressive and I can see how it will be useful for teams that pair intense design with development.
Also, in case you’ve been living under a rock, Flex Builder is being renamed Flash Builder. This was partly to separate it from the (still free, still open-source) Flex framework for Flash development, in hopes of preventing the “Why are you charging me for Flex builder? I thought this was free!” conversations. It was also because you can do more with
Flex Flash Builder than just write Flex-based applications. You can work strictly within ActionScript and never touch Flex, if you need to.
There was some community “outrage” over this when the name change was originally announced, but when you think about all of the reasoning, it does make sense. Flex camp can still be called Flex camp, and you can still call yourself a “Flex developer.” That would make more sense than calling yourself a Flash Builder developer anyway, just like you don’t see anyone calling themselves a “Dreamweaver Developer.”
Of course, with any new release of ColdFusion, you can expect a few things: Speed improvements, language improvements, and new features, to name but a few. CF9 does not dissappoint on any of these points.
First and foremost, Adam says that Adobe truly believes that the community should drive the future of CFML, which is why they created the CFML Advisory Committee — announced at CFUnited 08 — and why everything they’re working on for CFML is being discussed with them.
Much like Application.cfc — introduced in ColdFusion 7 — Centaur brings us Server.cfc, and the onServerStart method. This will be useful in spinning up front controller frameworks (like Fusebox or Model-Glue) or performing aggressive caching that would happen today when the first user opens the application. I would be surprised if there’s not more to Server.cfc than they are already telling us, but I’m pretty sure that this is all they’ve been willing to share so far.
Centaur will support nested transactions, a CFContinue tag has been added (and knowing that it was the only cfscript tag not implemented in CFML won me the shirt in the picture above, so thanks for the recent reminder Tim!), and assignment chaining (a = b = c) and ternary operators (variable = (condition) ? [value if true] : [value if false]) have been added.
You can now pass implicit structures and arrays into functions and tags. Previously, you had to declare a variable and assign it the value of your structure or array, and pass that variable to the function or tag. Not any more.
CF9 supports direct access to elements of arrays returned from functions (getFoo()). Adam wasn’t 100% sure whether this works for structures (nor if it already works, which I think it might), but says that he “can make it happen…”
Something that came out of the CFML Advisory Committee was that other CFML engines support IMAP but ColdFusion doesn’t. This will be rectified with CF9, and Adam promises that it’s as close to CFPop terminology and functionality as they could possibly make it, so it should be a comfortable transition if you’re already familiar with CFPop.
CF9 is also adding some advanced caching functionality to its core. They are using a java product very similar to memcache, but I didn’t think to write down its name. Sorry about that. Caching functions will include cacheGet, cachePut, cacheGetMetaData, (and “etc”) and the way Adam explained this is that if you cache a section of your template that is dynamic, CF will be smart enough to know when the variables that control that dynamic output are different, and automatically not use the cached version. On the flip side of the coin, if the variables haven’t changed, CF knows that the output won’t change, so that portion of the page will just be read from the cache. Sounds interesting to me!
Ah, cfscript. It really is a wonderful language, but it takes so much abuse because it doesn’t have parity with CFML functionality. In CF9, cfscript will have full parity with CFML, with one tiny exception — agreed upon by the CFML Advisory Committee — and that is CFSaveContent. Aside from the fact that it would be ugly as hell, it’s just not necessary. You can append a string quite easily in cfscript, which is all that CFSaveContent did anyway.
You will be able to write components (cfc’s) entirely in cfscript — without even including the cfscript tag. You’ll be able to use the “var” keyword anywhere within a function (which some argue is a bad thing — what do you think?). Implicit but overridable getters and setters will be added at runtime for cfc properties defined with the cfproperty tag or the property keyword.
“Import” and “New” keywords have been added. I’m a little unclear on what exactly import will do, and Adam says that it will be optional. I’m keeping a lookout for more details on that. New will replace the cumbersome CreateObject function. Oh, and we’ll have the option to use true constructors. Init will be supported as a constructor, or a function named after the class (cfc). This was pretty vague, but I’m sure all will be revealed in due time.
While we’re talking CFC’s, let’s talk local scope. Ben Forta explains the change fairly well, but he either made a mistake or his information is not in sync with the private beta. So first of all, a new keyword has been added to explicitly access the scope that’s used when you use the var keyword. So var foo = “bar”; now actually is analagous to local.foo = “bar”;. But Ben says that when CF9 sees var local = structNew(); it puts that into the new “local” scope as local.local. This doesn’t appear to be the case in the beta — CF is making a special exception and putting that “local” struct into the CFC’s variables scope, and any local.foo = “bar”; statements after that are treated as if your custom struct named local never existed.
There is some concern over this, because if you use a variable named local in multiple functions in one CFC, and not for the purpose of the function-local scope, (i.e. local=”some value”;) then it becomes not thread-safe. There’s still plenty of time for the beta participants and engineers to work through this, but it’s something to be aware of and keep an eye on.
Much has been said recently (1, 2) about CF’s new spreadsheet functionality, but I had sort of blown it off because spreadsheets just don’t sound exciting. Spreadsheets still aren’t exciting, but I’m impressed with the ease of using the CFSpreadsheet tag, and seeing Adam demo it live and show exactly how little code is required really blew me away. Once again, ColdFusion makes tedious/difficult things easy. POI? Never again!
Oh, and Excel 97, 2000, 03, 07, and 08 formats are all supported. And OpenOffice. Someone asked about Google Docs, and Adam’s answer was a little unclear for me, but what I got from it was that they are looking into Google Docs integration via services instead of baking conversion into the core.
This is a natural progression from CFDocument. Now you can create presentations right from your ColdFusion code. Adam gave a great example of how this might be useful: Say you need to give a weekly presentation on sales for the last week. You can create a CFML template that puts together tables of data and charts (with CFChart, of course), and save it as a powerpoint file. Then, instead of laboring over the presentation for hours every week, you just run your template and take the resulting file to the meeting. Sounds kind of niche, but cool.
And of course, PPT formats supported are: 97, 2000, 03, 07, and 08; and OpenOffice presentation format as well.
ORM (Object Relational Mapping) has been talked to death, so there’s not really any new information. The example code was fantastic and impressive, but it’s stuff you can find on blogs and by attending user group meetings. ;) We’re locked into stored procedures at the moment anyway, so this doesn’t apply to us and this entry is already pretty long as it is. I did write down some of the code samples, so if you’re curious you can send me an email or IM and I’ll share them with you.
Verity is super secret double probation deprecated. Allaire, Macromedia, and Adobe have deprecated things in ColdFusion in the past, but never removed them from the language. Adam stressed that now that Lucene’s Solr product has not only reached parity with Verity, but surpassed it — and for free — there is not much of a future in ColdFusion for Verity. Wink wink, nudge nudge. (Read between the lines: Verity will not be included in CF10.)
A Verity to Solr migration tool will be provided. There is no document limit. It supports advanced replication and caching, for use in a clustered environment. And full cfsearch & cfindex functionality is implemented with Solr.
Flex Proxy Tags
CF9 will ship with some new functionality (Adam stressed “CFaas” — CF as a service) for Flex developers. They are called Proxy Tags and let Flex developers have direct access to some of ColdFusion’s core functionality like CFPDF, CFMail, CFPop, etc. If you want more information, I posted a writeup and link to a video demo on my blog.
Just some random tidbits that I didn’t know where else to put:
- 64 bit will be supported in standard mode.
- Speed of flash remoting has been improved by making it less general and more specialized for ColdFusion
- A new AS3 data persistence library for AIR will come out at the same time. Not sure if it will be specific to ColdFusion (doubt it!) or even ship with it.
- A new Server Manager tool will come with CF9 — built with Flex and Air — that enables you to manage (i.e. deploy a new datasource) to several servers at once, instead of repeating the process over and over. Being an AIR app, it will run on the desktop and will have system tray notifications for events you want to watch.