ColdFusion Builder is the planned and eagerly anticipated IDE built specifically for us ColdFusion developers. Lots has been written about ColdFusion Builder already, and lots more will undoubtedly be written. But one feature that has been mentioned and not discussed in much detail yet, an absolutely vital feature for me personally, is the FTP integration. And having been using it extensively this week, and realizing in doing so that it is sometimes less than intuitive (although to be fair, the product is still in beta and not quite finished yet), I thought I'd share some notes on how to get started with ColdFusion Builder's FTP integration.
But first, a quick introduction. ColdFusion developers don't (well, shouldn't ever) write code on production servers. Ideally, they use a local Developer Edition (it's free!), write and test, and then deploy to another server, perhaps a staging server or a production server, as the case may be. Moving files to remote servers often requires the use of FTP, and so ColdFusion Builder features built in support for FTP (as well as FTP's more secure cousins, SFTP and FTPS). Using the FTP integration it becomes possible to easily upload and download files (or folders or even entire sites), compare local and remote file versions, and more.
To use ColdFusion Builder's FTP integration, you first need to define your FTP server, including specifying login information. To do this, open the ColdFusion Builder File view (by default is it on the left, under the Navigator view), and scroll down to find the FTP connection types (FTP, FTPS, SFTP). You can then right-click on the FTP connection type, and select the Add New FTP Site option to display the Create A New FTP Connection dialog box.
You'll need to specify the following:
- Site Name: A unique name for each defined FTP connection
- Connection Type: Should be set correctly based on the FTP connection type you right-clicked on
- Server: FTP server host name or IP address
- Username: FTP login name
- Password: FTP login password (or leave blank to be prompted for it when needed)
- Remote Path: Path to starting directory on FTP server (this will usually be / unless you have multiple sites defined, if it's wrong you'll know when you browse the server and see the wrong files and folders)
Note: ColdFusion Builder will default to using FTP passive mode. To change this if needed, click the Advanced Options button.
Once your FTP connection is defined, it'll show up under the appropriate FTP connection type in the File tab. You can expand and collapse the defined FTP connection to browse and access remote files and folders.
So far so good. But now let's connect this to ColdFusion Builder projects. When you work in ColdFusion Builder you define a ColdFusion project, which is accessed via the Navigator view. ColdFusion projects can be associated with FTP connections so that you can easily upload, download, and synchronize files. To do this, right-click on the project in the Navigator view, and select Synchronize, and then select Create New Synchronize Connection.
You'll be asked to define the connection, as follows:
- Connection Name: A unique name for each defined connection
- Path Local: Select your project, if it is not already selected
- Path Remote: Select the FTP server connection from the drop down list
You've now associated an FTP connection to your project, and you can use the synchronization options available from within the project right-click menu. To upload a file or folder, right-click on the desired file or folder, select Synchronize, and then select Upload. To download a file or folder, right-click on the desired file or folder, select Synchronize, and then select Download. You can also select Synchronize to perform a full synchronization, which will upload, download, and update, all in one step. This option displays the Smart Sync screen, which is used to actually manage the synchronization.
Note: Smart Sync runs based on the selected folder, and also includes all child folders. To Smart Sync an entire site, start from the site root. To Smart Sync a specific folder, make sure that folder is selected when you launch the Smart Sync window.
The Smart Sync screen lists all files that are not in synch, and indicates which way the synchronization needs to go (based on which is newer, the local file or the remote file). You can skip specific files and folders by clicking the Skip column, and can also instruct Smart Sync to delete orphaned files (ones that don't have matching files on the other end). Once you have identified the files and folder to synch, click the Start Sync button to initiate the synchronization process.
Note: By default, the Smart Sync screen displays all files and folders in a long list that can quickly become unmanageable. You may want to click on View Options and select Tree to display the Resources in a tree view.
One last tip to keep in mind. You can see exactly what the FTP connectivity is doing (down to each FTP command executed and the response received) in the Console view (by default this is under the editor area). The Console view is used for all console output. If it is not displaying FTP information, click on the Display Selected Console button above the view and select Aptana Synching Console.