This article will focus on what’s new on CFMX7 and how this new release is shaking up the Web application server market. I won’t try to teach you how to use all the new additions; instead, we’ll look at the new and exciting features of this release.
ColdFusion MX7 is packed with new features. The ones we’ll focus on here include Flash Forms, document generation, event gateways and reporting capabilities, though there are many others.
Macromedia brought a little of its presentation server, Flex, into ColdFusion with the addition of Flash Forms. This feature enables developers to create attractive, user friendly forms that can be delivered cross-platform to any Flash-compatible media.
To start using Flash in CFMX7, you’ll need to specify the form’s format, as well as its width and height, in the
<cfform format="flash" width="400" height="300">
You may notice that HTML and XML formats are also available. For now, we’ll stick with the Flash format.
If you run the code above, a Flash movie with the specified width and height is created, though nothing displays in it. Don’t worry: that’s just because we haven’t added any content to the movie yet!
Information in Flash Forms is organized in form groups that are identified by the
CFFORMGROUP tag. This tag holds 13 different types of groups, but for this article, we’ll explore just a couple of them.
First, let’s look at this simple form:
<cfform format="flash" width="400" height="300">
<cfformgroup type="tabnavigator" height="200">
<cfformgroup type="page" label="First Tab">
<cfformitem type="text">This tab hold just plain text.</cfformitem>
<cfformgroup type="page" label="Second Tab">
<cfformitem type="text">This is tab hold some form elements!</cfformitem>
<cfinput type="text" label="My name" width="190" name="myName">
<cfinput type="radio" label="I'm using ColdFusion MX 7.0" name="CFver" value="70">
<cfinput type="radio" label="I'm using ColdFusion MX 7.0.1" name="CFver" value="701">
<cfinput type="checkbox" label="This is a SitePoint.com article" name="sitePoint" value="yes">
You’ve probably noticed the several
CFFORMGROUP tags in the code. These tags are used whenever you want to group form elements. In this case, we’ve created a tab navigator with two tabs (pages). Each tab is a form group of its own. If you wanted to create three tabs, you would have to create three child form groups with type "page".
All the other tags included in the form were already present in previous editions of ColdFusion. Make sure you have at least Flash Player 7 installed.
This is what you’ll get when you run the code above:
You can choose between "First Tab" and "Second Tab" to view different content.
Getting on-screen information to appear elsewhere with the same look and feel has presented a constant problem for the creators of Web-based applications. Well, not any more! Now you can specify the generation of PDF or Flash Paper documents with the exact format you want. Just use the
CFDOCUMENT tag in CFMX7 — it’s that easy! Try this:
SitePoint.com - Introduction to ColdFusion 7
This is an example of PDF generation using ColdFusion 7.
What will you end up with? A full-featured PDF containing your content, styled exactly as you want it to appear:
From version 7 onwards, ColdFusion supports gateways. Gateways are interfaces to other systems; they’re ways for events to trigger ColdFusion actions. CFMX 7 supports several gateways, including asynchronous processing, JMS, XMPP and SMS gateways.
How do gateways work? Well, if you have an online SMS gateway in your system, ColdFusion can listen to incoming SMS messages that contain commands, then trigger processing of those commands (e.g. an authorization request). It can even send an SMS back to you to communicate the result of such processing.
To see how gateways work, check out the CFDOCS for instant messaging implementation by Macromedia’s Ben Forta. If you have Yahoo! Messenger, you can add a pal named "cflivedocs". Then, open a conversation and write
CFDOCUMENT. Surprise! The server returns the tag’s information straight from Macromedia’s product reference manual. This works with any ColdFusion tag.
Report Builder is another exciting feature of CFMX7. This is a stand-alone application that ships with the Coldfusion package, enabling you to create dynamic report templates (CFR files, for ColdFusion Report).
CF Report Builder also includes a visual query builder, and allows you to specify layouts, and format each report element at your convenience.
You can display these reports on your pages using the CFREPORT tag. The output can be exported to PDF, Flash Paper, Excel and RTF formats, though, to get support for this last format, you must have ColdFusion 7.0.1 installed. Here’s how it’s done:
<cfreport template="YourReport.cfr" format="pdf">
Developing for the New ColdFusion
All these new features can render some current IDE software, like Dreamweaver, out of date when it comes to working with CFMX7. Dreamweaver 8 ships with full CFMX7 support, but if you’re using a prior version (such as MX 2004), you can download the CFML 7.0 support plug-in from the Macromedia Website. There are also updated code and help files available for Homesite+. If you’re already using ColdFusion 7.0.1, the new features introduced in this version are not yet supported on IDEs.
If you’re after an alternative to Macromedia’s own software, you can use the excellent CFEclipse plug-in for the Eclipse 3.x platform. The current version (2.0) features full CFML 7.0 support. Get used to the Eclipse environment, as it will be the base for the upcoming Macromedia’s Flex IDE.
Moving into the Java World
Everyone knew that ColdFusion made the use of Java classes very easy. Now, with version 7.0.1, the benefits become bidirectional.
ColdFusion now has the CFCProxy, which enables programmers to invoke CFC components directly from Java code. This will, for sure, reinforce the enterprise aspect of ColdFusion. With this new functionality, Macromedia ensures that investments made either in Java or ColdFusion can be reused, offering added value to customers.
There’s a lot more to say on Macromedia ColdFusion’s new features — the market is already reacting to this new feature-rich release. Macromedia’s upcoming merge with Adobe will confirm ColdFusion’s place in the market, and I’m sure we’ll see great things on the next release. These are exciting times for the CF community!
Wrapping Your Head Around Python
Introduction to Swift
Jump Start Git
Level Up Your Web Apps With Go
Jump Start MySQL
Jump Start Git
- 1 Elastic and On Demand - Why Influx Is the Solution for Customer Support
- 2 There Are More Virtual Reality Headsets Than You Realize!
- 3 5 Ways to Delight with UX Details Combining GIFs and CSS
- 4 Seven Ways You Can Place Elements Using CSS Grid Layout
- 5 Realtime App Development with RethinkDB and React Native