Accessibility

ColdFusion Article

Ben Forta

Ben Forta

www.forta.com

Macromedia Flash MX Data Connection Kit—Powered by ColdFusion

Note: Macromedia Flash MX Data Connection Kit is now available for purchase. It includes Macromedia Firefly Components and Macromedia Flash Remoting MX Developer Edition. This article shows you how to build a sample application using Data Connection Kit.


Macromedia recently released Macromedia Flash MX Data Connection Kit, a Macromedia Flash MX add-on designed to simplify building rich data front ends in Macromedia Flash. To introduce you to the new Data Connection Kit, and to jump-start using this new tool, build a complete application with me—using ColdFusion MX on the back end and the Data Connection Kit on the front end.

Note: This article assumes that you have a good working knowledge of ColdFusion, that you use ColdFusion MX, and that you are familiar with ColdFusion components.

What is the Data Connection Kit?

Ever since Macromedia Flash MX shipped over a year ago, Macromedia encouraged developers to use Macromedia Flash as a rich application front-end. This is a good thing. For too long, developers and end users associated Macromedia Flash with animation, advertisements, and the dreaded "skip-intro." But Macromedia Flash can do so much more.

Macromedia Flash MX made some important advances in making Macromedia Flash more usable for developers (coders). Macromedia Flash MX enables developers to do more with code within Macromedia Flash, has a more intuitive code editor, and introduced support for reusable components (Macromedia Flash components are not the same as ColdFusion components; the two component types have nothing to do with each other). The latter is important—Macromedia Flash components jump-start and save you time developing Macromedia Flash applications; you don’t have to start from scratch each time. Macromedia Flash comes with components for form controls and more. Macromedia released additional components in each Developer Resource Kit (DRK), and you can download many more from Macromedia and other sites.

Macromedia Flash MX also introduced support for Macromedia Flash Remoting, technology that enables Macromedia Flash to pass data seamlessly to back-end servers (like ColdFusion).

As I already noted, Macromedia Flash MX is far more coder-friendly than any prior version of Macromedia Flash. And so, over the past year, we've seen an explosion of Macromedia Flash applications—from widgets and form controls to complete full-blown apps; Macromedia Flash continues to find its way into more and more developers' toolboxes.

But we're not quite there yet. For many coders, Macromedia Flash is still too complicated—the development model, the way you build Macromedia Flash apps, the terminology, the IDE itself—all of these facets can be somewhat foreign, even to hardcore developers. And this is where the Data Connection Kit comes into the picture.

The Data Connection Kit includes:

  • The Firefly Components
  • Macromedia Flash Remoting MX Developer Edition

The latter is somewhat insignificant to ColdFusion developers because ColdFusion MX (and JRun 4) includes Flash Remoting at no extra cost; an extra developer license is not an extra value. What’s really interesting are the Firefly Components. These are Macromedia Flash components that encapsulate Flash Remoting integration, simplify the binding of UI elements, and even track changes to facilitate data editing in a multi-user environment.

Using the Data Connection Kit, you'll still need to do some coding in Macromedia Flash (well, in ActionScript). But you will not have to code the UI integration piece—where most coders get stuck.

What You Will Build

The best way to learn about Firefly Components is through using them. This article does not cover every feature and option that the components support. Refer to the Data Connection Kit documentation for complete component coverage and extensive examples. In this tutorial, we will build an application with a data-entry front end for a user database. It will feature:

  • A data grid that allows you to browse and scroll through a list of users.
  • Navigation controls to scroll through and edit data.
  • A detail view for displaying additional information about a selected user.
  • The ability to edit existing users, insert new users, and delete users.
  • A pop-up list of available field options where appropriate.
  • Batch database updating.
  • … all in a single screen!

Ready? Great, we're about to begin. First, fulfill the following prerequisites.

Software Requirements

  • ColdFusion MX. Also install the ColdFusion example applications (select the appropriate checkbox during the ColdFusion MX installation. The database you use is part of the example applications.)

  • ColdFusion MX updater. Apply the latest updater to ColdFusion MX.
  • Macromedia Flash MX

  • Data Connection Kit. Buy a copy online or purchase a DevNet Professional subscription, which also includes the Data Connection Kit.
  • The completed files (3K) for this tutorial. To get the most out of this tutorial, I strongly suggest that you build the files for this tutorial: users.fla, users.swf, users.cfc, and displayDeltaPacket.cfm, and refer to the completed files when you get stuck.

Table of Contents

Next ›


About the author

Ben Forta is the Macromedia senior product evangelist and the author of numerous books, including ColdFusion Web Application Construction Kit and its sequel Advanced ColdFusion Application Development, as well as books on SQL, JavaServer Pages, WAP, Windows development, and more. Ben co-authored the official Macromedia ColdFusion training material, the certification tests and Macromedia Press study guides for those tests, now spends a considerable amount of time lecturing, speaking, and writing about application development worldwide.

 

Submit feedback on our tutorials, articles, and sample applications.