Accessibility
 
 
ColdFusion Integration with Dreamweaver, GoLive, and UltraDev
by David Golden
Technical Writer
Allaire Corporation

As the popularity of ColdFusion grows, visual design tool choices for developing ColdFusion applications continue to increase. At present, three of the most popular visual design tools on the market support ColdFusion: Macromedia Dreamweaver 3, Adobe GoLive 5, and Macromedia Dreamweaver UltraDev 1.0.

Whether in the form of ColdFusion expansion packs for Dreamweaver 3 and GoLive 5 or ColdFusion integration in UltraDev, Web professionals from all disciplines can now build ColdFusion applications with their favorite visual design tool in either Windows or Macintosh. (Please note that ColdFusion Server does not support the Macintosh platform.)

This article will tell you where to find extension packs, how to install them, and what functions you can expect to find in each. In addition, the ColdFusion features contained in UltraDev will be examined.

ColdFusion Extensions for Macromedia Dreamweaver 3

Downloading and Installation

The Dreamweaver Extensions for ColdFusion can be found at the Macromedia Exchange for Dreamweaver (registration required). You will also need to download and install Macromedia's Extension Manager to complete the installation.

Once you have installed the Extension Manager, move the extension file, named MX15666_AllaireColdFusion.mxp at the time of this writing, to the Downloaded Extension folder within the Dreamweaver folder (see Figure 1).

Figure 1

Figure 1: Downloaded Extensions Folder

Next, either double-click on the ColdFusion Extension or do one of the following steps while in Macromedia's Extension Manager (Figure 2):

  1. Select Install New Extension from the File menu
  2. Click the far left button on the tool bar in the Extension Manager
  3. Hit Ctrl+I while inside the Extension Manager

Figure 2

Figure 2: Macromedia Extension Manager

Usage and Features

The ColdFusion Extensions allow a host of CFML functions to be performed in Dreamweaver. The ColdFusion Extensions can be accessed in two ways:

  1. Select Insert on the Dreamweaver menu bar, click on Allaire, and choose the desired ColdFusion object (see Figure 3A).
  2. In the Objects window, select ColdFusion, which will show icons for the ColdFusion Extensions (see Figure 3B).

Figure 3a

Figure 3A: Inserting ColdFusion Objects via the Insert Menu (Click to Enlarge)

Figure 3b

Figure 3B: Inserting ColdFusion Objects via the Objects Window

A tag editor dialog box will appear after you select an object, such as CFLOCATION (see Figure 4). In the tag editor, enter the values you want in the fields and click OK. An icon representing the object will appear in the editing window.

Figure 4

Figure 4: CFLOCATION Tag Editor Box

After the object has been created, you can edit its properties by highlighting the icon, which displays the object's attributes in Dreamweaver's Properties window (see Figure 5A). Also, by clicking on the Quick Tag Editor icon on the far right in the Properties window, you can edit the CFML code directly (see Figure 5B).

Figure 5a

Figure 5A: Dreamweaver Properties Window

Figure 5b

Figure 5B: Dreamweaver Quick Edit Dialog

Below is a comprehensive list of the ColdFusion objects included in the Dreamweaver Extension and their functions:

Name
Icon
Description
CFLOCATION Opens a specified Web resource, such as a CFML or HTML page
CFCASE Matches expression results
CFCHECKBOX Creates CFINPUT check box
CFCOOKIE Defines cookie variables
CFDEFAULTCASE Receives control if there is no matching CFCASE tag value
CFDIRECTORY Handles all interactions with directories
CFELSE Performs logic based on an additional condition or set of conditions
CFELSEIF Cycles through a number of conditions and produce varying output
CFFILE Handles all interactions with files
CFFORM Builds a form with CFML custom control tags
CFIF Create simple and compound conditional statements
CFINCLUDE Embeds references to ColdFusion pages inside CFML
CFINSERT Inserts new records in data sources
CFLOOP Repeats a set of instructions or display output over and over until condition(s) is met
CFMAIL Sends e-mail messages via an SMTP server
CFOUTPUT Displays the results of a database query or other operation
CFQUERY Passes SQL statements for any purpose to data source(s)
CFRADIO Creates CFINPUT radio button
CFSET Defines a ColdFusion variable
CFSWITCH Evaluates a passed expression and passes control to CFCASE tag matching the expression result
CFTEXT Creates CFINPUT text
CFUPDATE Updates existing records in data sources

ColdFusion Extension Palettes for Adobe GoLive 5

Downloading and Installation

The Adobe GoLive ColdFusion Toolkit can be downloaded on the Web site of Portent Interactive in either Windows or Macintosh format.

After extracting the files from the ZIP or SIT file, you will have three folders and one PDF. Copy the three folders into the GoLive 5.0/Modules/Extend Scripts directory on your local hard drive. If running, GoLive should be restarted.

In GoLive, choose Window on the menu bar and pick Objects. You'll notice three new palettes:

  • ColdFusion Tags —
  • ColdFusion Guest book —
  • ColdFusion E-mail Form —

If the new palettes don't appear, make sure that the GoLive 5.0 SDK is installed (located on the GoLive 5.0 CDROM) and that you placed the folders in the Extended Scripts directory.

Usage and Features

Clicking on the ColdFusion palette shows the various ColdFusion tags available for insertion (see Figure 6). Similar in function and scope to the Dreamweaver Extensions, the ColdFusion palette contains 12 tags.

Figure 6

Figure 6: GoLive ColdFusion Palette

The following table displays the ColdFusion tags included in the GoLive extension palettes and their functions:

Name
Icon
Description
CFOUTPUT Displays the results of a database query or other operation
CFINCLUDE Embeds references to ColdFusion pages inside CFML
CFSWITCH Evaluates a passed expression and passes control to CFCASE tag matching the expression result
CFCASE Matches expression results
CFQUERY Passes SQL statements for any purpose to data source(s)
CFMAIL Sends e-mail messages via an SMTP server
CFIF Create simple and compound conditional statements
CFLOOP Repeats a set of instructions or display output over and over until condition(s) is met
CFPARAM Tests for a parameter's existence and data type as well as providing a default value if not assigned
CFSET Defines a ColdFusion variable
CFINSERT Inserts new records in data sources
CFUPDATE Updates existing records in data sources

In addition to making the addition of basic ColdFusion functionality simpler with drag-and-drop palettes, the toolkit allows you to edit ColdFusion tag settings with GoLive's Inspector dialog boxes (see Figure 7).

Figure 7

Figure 7: GoLive Tag Inspector Dialog Boxes

Portent Interactive also includes two additional palettes in the Extension Toolkit to facilitate the building of ColdFusion mail forms and address books. To learn more, read the instructions in the Guide PDF included in the ZIP archive.

ColdFusion Integration with Dreamweaver UltraDev 1.0

Dreamweaver UltraDev provides basic database functionality for building ColdFusion applications. Taking full advantage of UltraDev's ColdFusion functionality requires properly configuring data sources and server types. For definitive instructions, refer to the UltraDev documentation.

The Data Bindings and Server Behaviors window (see Figure 8) is the principal control panel for ColdFusion development in UltraDev. Depending on the recordset(s) specified during setting up the data sources, the file tree ("Recordset (Recordset1)") shows the individual database columns in the Data Bindings pane. You can also specify form, URL, session, client, and application variables.

Figure 8

Figure 8: UltraDev Data Bindings and Server Behaviors Window

To insert an item, simply click on it and drag into an open document. Also, you can highlight the item and click the Insert button at the bottom of the window. Once inserted, the Binding and Format columns display the item's format attributes. To change the format output of any item, click on the button to the right of the item category and a menu of different formatting choices will appear (see Figure 9).

Figure 9

Figure 9: UltraDev Format Options in Data Bindings (Click to Enlarge)

After inserting database connections in the Data Bindings pane, the Server Behaviors pane allows you to create simple ColdFusion instructions to handle and manipulate the data. A variety of functions can be specified, such as hiding a region, updating a record, inserting a stored procedure, and creating dynamic page elements.

Conclusion

Keep in mind that Dreamweaver, GoLive, and UltraDev only provide a taste of the rich database-driven functionality possible with ColdFusion. To develop truly scalable and flexible ColdFusion applications, ColdFusion Studio 4.5 remains the pre-eminent ColdFusion development environment.

However, for Web professionals who already use Dreamweaver, GoLive, or UltraDev will be able to take advantage of ColdFusion's power for building Web applications. For definitive answers about any of the products, please refer to the vendors' Web sites.