'How do I run ColdFusion 8 and 7 side by side on IIS?' or 'How can I run Railo and Adobe ColdFusion side by side, so I can share the same code base?', is a question I see quite regularly on CF lists.
I figured I would write up a blog post about how I go about solving this problem, since I do this a lot with my Transfer development.
The quick answer is - I don't. Trying to set up two different Application servers (CF7 vs CF8) on the same Web Server (IIS or Apache), is not something I desire to tackle, and seems way more convoluted than I care to trouble myself with.
The problem is usually broken down into:
- How do I test the same code on different versions of CF?
- How do I do so without having to move/sync files between machines?
- How do I set it up so it is easy to switch between versions of testing?
I solve each of these problems with Virtual Machines , and Shared Folders.
I have actually bought VMware's Workstation product, and I use it every day, but there are several free products out there that will do virtualisation for free.
First thing first, where does my actual CFML code sit? This sits on my primary machine, commonly referred to as the host machine, in VM speak. This is because the host has guest machines, namely of the Virtual Machine variety.
This means my CFML code is always available if I want to get my hands on it, and I can open it in Eclipse on my host machine as well, so I do all my editing and development with tools on my host machine.
I also do this because I can then share this code between virtual machines, using a mechanism called Shared folders.
So, now that I have my ColdFusion code, I create myself a new virtual machine. In my case, I use Ubuntu Server, because its lightweight, and I can get one up and running in about half an hour, but you could use XP, or anything that runs CF.
I then configure my virtual machine to share my host folder which contains my CFML, which is a setting I am able to configure within VMWare. This then becomes accessible at /mnt/hgfs/wwwroot in my Ubuntu server on my VM.
From here, I can now install ColdFusion 8 on this VM, and point it to /mnt/hgfs/wwwroot folder to serve cfml from.
I can then create extra virtual machines, one for each version of ColdFusion that I need.
When I need to test against a version of ColdFusion, all I need to do is start up the virtual machine in question, and browse to it. To switch versions of ColdFusion, I simply power the current one down, and start up another one.
I find this a much easier way to test the same code base between different versions of ColdFusion than trying to run them side by side.
We're back to regular CFUG's, after the break for WebDU, and I think we have a pretty interesting presentation lined up!
NGA.net, Level 2, 17 Raglan St, South Melbourne
17th of July, Meeting starts at 7:00, so get there before hand (doors open at 6:30).
Elliott is a software engineer at TeraTech, Inc. and the lead developer for the Conferences department. He has worked on a variety
of projects that include network services, realtime messaging systems, survey processors and most commonly web applications. As a strong advocate of web standards and accessibility he volunteers his free time to help new developers learn standards and best practices. He is also proponent of design patterns and draws his vision about application design from experience with many languages that include ColdFusion, Java, ruby and php.
Internals of the Adobe ColdFusion Server
To many CF developers the ColdFusion server is a block box that just works. This presentation takes a look at how the internals of the engine operate. The presentation covers how variables, scopes, functions, cfcs, custom tags, includes and java objects are implemented and how we can use this knowledge to do things not normally possible with the CF functions.
We'll look at how to implement several features in CF6, CF7 and CF8 like:
- Query Caching with the native CF query cache for queries that use
- Create and execute queries that use cfqueryparam from cfscript.
- Create a function like CF8 to get database info for a datasource.
- Add global mappings by appending to a structure like this.mappings in CF8.
- Call functions and component methods and inspect the local scope
after their execution.
- Access the Application.cfc anywhere in an application.
- Allow passing arrays of values in the url scope instead of lists
when there are duplicate keys.
If you are going to attend, please RSVP to mark (dot) mandel (at) gmail (dot) com.
Only those that RSVP are eligible for the door prizes, so make sure you apply!
See the CFUG Melbourne Calendar at:
Or add to your Google Calendar - search for 'CFUG Melbourne'.
As per usual, we'll grab pizza during the evening, so we have something to scoff down!
Look forward to seeing you all there.