30 April 2010
This article describes how to set up a development environment on a Windows or Mac computer for ColdFusion web applications with Adobe Dreamweaver CS5. Adobe ColdFusion 9 Developer Edition can be downloaded free of charge for developing and testing web applications on your local computer. You can use it to develop and test your web applications as long as you want; the software does not expire.
Setting up a development environment for Dreamweaver is a three-part process. First, you set up an Adobe ColdFusion application server. Separate instructions are given for Windows and Mac OS X. Second, you define a Dreamweaver site. Third, you connect to your database. This article follows this three-step process.
Note: Adobe does not provide technical support for third-party products such as database systems.
This section describes how to install the developer edition of ColdFusion 9 on Windows. If you are using Mac OS X, skip to Setting up ColdFusion on Mac OS X.
These instructions are for Mac OS X. Installation instructions for Windows users are in the previous section. If you have already installed ColdFusion 9, proceed straight to the next section.
The Mac installation process asks you to confirm that you don't already have a ColdFusion 9 server on your computer (if you do, it will be located in Applications/ColdFusion9). If you have an earlier version of ColdFusion on your computer, you will be asked if you want to migrate the settings to ColdFusion 9.
To learn more about the ColdFusion Administrator, see Administering ColdFusion in the ColdFusion documentation.
Once you have installed ColdFusion, you're ready to start developing ColdFusion pages and applications in Dreamweaver. In order to display your pages in Live view or Preview In Browser, the dynamic code needs to be processed by the ColdFusion server. This means storing your pages inside the server's document root. If you followed the instructions in the preceding pages, the document root will be at the following location:
Note: Strictly speaking, you can store your ColdFusion files anywhere on your computer, but they need to be copied to the ColdFusion server whenever you view them. So, it's common practice to store them inside the document root in the first place. This avoids cluttering your hard disk with duplicate files.
Instead of accessing the files directly, you need to use a URL. The URL for the ColdFusion document root is http://localhost:8500/ or http://127.0.0.1:8500/. Both represent the same place: localhost is an alias for 127.0.0.1, the loopback IP address meaning this computer. The :8500 indicates the port used by a ColdFusion development server.
If you locate all your files in the wwwroot folder, you can create only one site. So, it's usually more efficient to develop your ColdFusion sites in a subfolder of wwwroot. You add the name of the subfolder to the end of the URL in the same way as you would for a subfolder in a live website. For example, if you create a site in a subfolder called cftest, the URL becomes http://localhost:8500/cftest/.
The Dreamweaver site is now defined and the sample files installed. The next step is to connect to the sample database included in the sample files.
This section describes how to create a connection to a sample database. The sample files you copied in the previous section include an embedded Derby database. Derby is supported in all operating systems that ColdFusion supports and is therefore a great solution for cross-platform development.
When developing a ColdFusion web application in Dreamweaver, you connect to a database by selecting a ColdFusion data source defined in ColdFusion Administrator, the server's management console. A ColdFusion data source is a type of shortcut to a database. Dreamweaver uses the data source to create a connection to the database.
For information on connecting to other database systems, see Database connections for ColdFusion developers (link to DW CS5 help page) in the Dreamweaver online help.
To create a ColdFusion data source, follow these steps:
The ColdFusion Administrator should open automatically in the Data Sources screen. If it doesn't, select the Data Sources link in the left sidebar.
The folder should be located in the following folder:
Ensure that Create Database is not selected.
The central section contains dynamic text objects highlighted in light blue (see Figure 22).
To learn more about creating web applications with ColdFusion, visit the Getting Started page in the ColdFusion Developer Center.
Tutorials and samples