Category: ColdFusion

Working with large numbers of projects in Eclipse and any of the Eclipse based products such as Flex Builder, ColdFusion Builder or CFEclipse can become cumbersome and become a bottle neck in a good workflow.

One of the many ways to work better within this space is to make efficient use of your navigator (or project explorer) and searching dialogs. Working sets can be used to filter search results as well as your navigator view, but constantly switching them can be a pain. Window working sets however can be a globally applied and just a few tweaks can make using them easy. Here is what I recommend!

  1. Make sure you have the menu item turned on. Customize your current perspective (Window ==» Customize Perspective). Under command group availability, make sure "window working set" and "Working set manipulation" are checked.
  2. Create a shortcut: Go to Window ==» Preferences ==» General ==» Keys. I prefer to use F3, since it's a continent key and I don't use its default binds ever. Sometimes the scopes can be difficult to always get right, so I choose "all editor scopes", "In Console View" and "In Windows" for the best results.
  3. Make your views take advantage of "Window Working sets". The two most common usage points will be your Navigator and Search Results. In the option menus for both of these you can choose working sets from the list; however instead of separately choosing your projects per view, choose "Windows Working Set" radio button.
  4. Now you can hit {F3} or what ever your chosen hot key was at any time. You can change, edit or create new working sets from one interface and all your views will obey this choice. This is fantastic if you work on multiple large projects in a single days time especially.

 

I've worked on a number of projects lately that have required the reviewing of HTML mail generated by ColdFusion's CFMail. In every development environment I've worked in the mail server is either 0.0.0.0 or there is a dummy mail gateway. In in either case knowing what the HTML will really look like can be difficult.

To help me with this issue I whipped up this very simple Adobe AIR app to help me look at the results. It's not a perfect solution and cannot account for the multitude of environments that the email will be viewed from, but it will render plain text and HTML emails close to what they would be viewed as in a mail client; it's also nice that to app is dead simple/basic.

Just point the app at your ColdFusion instance's "bad mail" folder and make sure your email server is set to 0.0.0.0 in CF Administrator

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 6.0.65 or higher installed.


CFMail Viewer : Trunk - http://svn.empiregpservices.com/svn/OpenSource/CFMailViewer/trunk
CFMail Viewer : Branch 0.5.0 - http://svn.empiregpservices.com/svn/OpenSource/CFMailViewer/branches/0.5.0/

SVN Username = public
SVN Password = public

 

CFMail Viewer Screen Shot

In a previous release of CF Builder there was a bug that some of you may have run into. The result of the bug was getting Eclipse pop-up errors when you tried to copy-n-paste with the keyboard shortcuts in cfm and cfc files. I entered a bug and it was fixed within a couple of days.

However after upgrading from the pre-release version to the latest public release, I will still getting the error. It was not until I blew away the .metadata\.plugins\org.eclipse.core.resources folder and started from scratch with my projects. So if your still hitting this issue or similar, please try this step to resolve it.

 

 

I am building a new site on my server that will be another Mango Blog. Mango is not setup for running multiple instances like it would be nice if it did, but very easily you can at least use the same file base. While this won't save you much on anything other than disk space for the CF Files and for the file cache if your CF server has that turned on; it certainly is nice to have one install location instead of 2 or 3.

To do this you will need to edit only 2 files:

  1. Application.cfm
    • Change the "this.name" setter on line 7ish to something that would be URL driven. In my case I used:
      this.appKey = replaceNoCase(cgi.server_name, "www.", "");
      this.name = "mango_#right(hash(this.appKey),50)#_v1_4";
    • The around line 41 you will find a reference to config.cfm. I've replaced this with: config_#this.appKey#.cfm
  2. admin/setup/Setup.cfm
    • Using the same method as Application.cfm I created an appKey var in the function saveConfig. Around line 268/269 will be two references to config.cfm; again replace these with: config_#this.appKey#.cfm

Now Mango Blog will be using config files based on the server name of the current site. The only secondary change I made was in the config files themselves.

  • Make sure the tablePrefix values are different
  • I adjusted my asset directories to be unique per site: assets/content/{new site name}/

For months I've thought about the power of virtual machines. I use them all the time now for production and staging servers and in the past I've used them for QA purposes in a lab. However I have never run a VM instance on my own box.

Recently I purchased a VMWare Workstation 6.5 license on the cheap and on a re-wipe of my laptop decided to put it into use. I now have multiple XP VMs, a Win Server and an OpenSUSE distro. I am now able to have multiple server setup options at my fingertips with ease.

Setup
After several setup attempts I think I have found a great mix.

  1. All of my development tools and code are located on my real machine.
  2. All of my services are located on a VM
  3. All of my services via UNC paths call on files from the HOST machine.
    • This allows me to have multiple servers from multiple VMs reference [easily] the same code set.


Things To Pay Attention To

  1. Setting up the networking can be difficult the first time, but it really is easy. I choose to run everything in NAT mode; just make sure your firewall settings are all correct. I've also made all of my Windows machines part of the same workgroup to make some file browsing easier.
  2. Permissions: In my case I created a VMUser in my VMs that was an admin/root and on my main box created that same user. I made sure VMUser had read/write too all of the relevant files. I then made sure all of my services were running as that user.
  3. Flex / Flash Development and Debugging: Because you will be launching your debugging on an IP such as 192.168.248.x instead of 127.0.0.1 your Flex Builder will be unable to attache to the debug tool from the browser. When you launch your flash/flex app right click on the flash app area. When you click you will see a menu item "Debugger"; click it. You will get the following pop-up. When you do change the selected option from localhost to other machine and enter 127.0.0.1. Viola, your debugger will now attache!


So far my experience is extremly positive. I recomend a minimum of 4 gigs; this is what I currently have and I would want no less. My next laptop will definetly have either 6 or 8 gigs to allow me to run multiples at the same time, or maybe even make a VM my full time editing area. VMs can do multi-monitor BTW! I would love to have my base OS be basically naked and be able to more easily do snapshots and go backwards in time. For me, setting up all the servers takes the most time. Now I can just backup my VMs and on a future wipe of my box, literally be up and running in say an hour instead of 5 or 6.