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)

Once you have filled in the form, click the Test button to make sure you can indeed connect to the server. And finally, click OK to save the connection.
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

Then click OK to save the connection.
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.

15 thoughts

  1. Thanks for the info!
    Now all that is missing is a "Automatically upload files on save" option like in Dreamweaver, then it’d be complete ;D

  2. I second the vote for a requirement to automatically upload files on save. If a save doesn’t "really" save, then it isn’t a save.
    Also, and I know that you’re not requesting new features in this post…
    If I could have a simple .csv file of every page that I opened along with a timestamp, that could help me reconstruct what I was working on last week/month.
    I think something so simple, automated, could be a big help to almost every programmer.

  3. I second the vote for a requirement to automatically upload files on save. If a save doesn’t "really" save, then it isn’t a save.
    Also, and I know that you’re not requesting new features in this post…
    If I could have a simple .csv file of every page that I opened along with a timestamp, that could help me reconstruct what I was working on last week/month.
    I think something so simple, automated, could be a big help to almost every programmer.

  4. I second the vote for a requirement to automatically upload files on save. If a save doesn’t "really" save, then it isn’t a save.
    Also, and I know that you’re not requesting new features in this post…
    If I could have a simple .csv file of every page that I opened along with a timestamp, that could help me reconstruct what I was working on last week/month.
    I think something so simple, automated, could be a big help to almost every programmer.

  5. @Phillip, SVN or other version control can help you there. Not so much in what you opened, but what changed and when.
    As for auto upload on save… Unless the FTP site is a test server, that is the same thing as editing code on production. Make a t

  6. I vote against automatic upload on save. In fact, I really don’t care for having ftp in the ide. I’d rather use something like ant that can create a reliable deployment package. So far, the first thing I do when set up the CF perspective is close the file/ftp view. It’s fine if you’re a one person shop and have no issues posting to your hosted website directly, but in a team environment, it can really work against your processes.

  7. I’ll throw in my vote for an option to automatically upload files on save as well. I work in a very controlled intranet environment where developers only have SFTP access to the development servers, and code is promoted to the test and production servers using an external tool that gathers proper sign-offs. Sounds fun, eh? Sure, I could install dev CF locally for a fourth layer of servers, but that doesn’t sound very efficient.
    Currently, I’ve found the easiest solution is to map a drive letter to my dev SFTP connection using ExpanDrive, but if I could cut that out of the picture, all the better.

  8. Of course it’d have be optional and off by default. But still, for some people (like me) it’s a nice, if not must-have, feature…

  9. I’m hoping the team works on more critical functionality than FTP.
    CF Builder is a huge step toward better tooling for CFML developers, but it still has a long way to go to compete with the competition.
    Refactoring, introspection, code generation; these are just a few things that need a LOT of help in CF Builder. Given that CF is about RAD, it’s ironic that almost all other platforms have tools that blow CF away in the productivity realm.
    It’s CF’s dirty little secret. As much time as CF saves in coding is lost by lack of adequate tooling.
    In other words, I’d prefer to see the team focus on core tooling rather than the add-ons already provided by using Aptana as the base for CF Builder.

  10. Ben,
    What would be handy is to be able to switch sync targets on the fly – possibly this is already supported. This will help with deployment over multiple servers.
    Jeff

  11. I agree with TJ.
    I can do all of the above with ANT. ANT has a very low learning curve and deployments with ANT didn’t need to be simplified.
    I don’t need need a deployment process built into my IDE. I need the IDE to stop me from making coding mistakes.
    I would be more impressed if CF made it easier for me to deploy a CAR file that I could integrate with ANT.

  12. People against auto-upload on save:
    I’m pretty sure this would be an option that could turned off by default. It’s not like it’s going to affect you at all if it’s included. Given that the product already had FTP capability, I’m guessing the ability to upload on save isn’t a huge investment in development resources.
    Leaving something out of a product because it could be misused is a mistake. I want my development and production environments to be as similar as possible. My MS SQL Server database doesn’t run on my MacBook Pro. My MacBook Pro doesn’t always have access to my file server filled with scanned documents, etc. So I have a production server and a development server. I want to develop and test on my development server and move to production only when ready. Just because FTP is involved doesn’t mean I’m not using a safe, separate development environment.
    The idea that CF Builder needs a full ANT script to handle something that an archaic piece of bloatware like Dreamweaver can do with a single checkbox just seems wrong.
    I’ve abandoned Dreamweaver and have been bouncing among IDEs/editors for a while. This is the one thing that is missing from CF Builder for me. I still use CF Builder, but it just leaves a bitter taste in my mouth that I have to remember to do a FTP transaction by hand for my save operation to actually save.

  13. Why isn’t network share an option?
    It is in Aptana’s product (which is what CF Builder is using under the hood) so it seems to me it should be an easy feature to add.

  14. I’ve found a way to automatically upload to (S)FTP on Save using an Aptana Monkey script. Kudos go to Ingo Muschenetz who created this script.
    1. Create a folder named ‘script’ or ‘monkey’ in the root of your ColdFusion Builder project
    2. Create a new .JS file named ‘autoupload.js’ (or any name to your liking, as long as it’s a .js)
    3. Put the following code in autoupload.js:
    /*
    * Menu: gMan > Upload On Save
    * Kudos: Ingo Muschenetz
    * License: EPL 1.0
    * Listener: commandService().addExecutionListener(this);
    * DOM: http://localhost/com.aptana.ide.syncing.doms
    * DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
    */
    function commandService()
    {
    var commandServiceClass = Packages.org.eclipse.ui.commands.ICommandService;
    var commandService = Packages.org.eclipse.ui.PlatformUI.getWorkbench().getAdapter(commandServiceClass);
    return commandService;
    }
    function preExecute(commandId, event) {}
    function postExecuteSuccess(commandId, returnValue)
    {
    if (commandId == "org.eclipse.ui.file.save")
    {
    sync.uploadCurrentEditor();
    }
    }
    function notHandled(commandId, exception) {}
    function postExecuteFailure(commandId, exception) {}
    4. Save the file
    5. Done! Now, if you save a file in a project that is being synchronised by a synchronise connection it automatically gets uploaded.

  15. Very useful; I am just evaluating CF Builder (we previously used DreamWeaver of Homesite). One feature I cannot find which you referred to is how compare local and remote file versions – the compare with only links to local history. I know this is an older posting, but you’ve always been helpful in the past!

Leave a Reply