Compound Theory

v2.0

Categories

  1. Transfer
  2. ColdFusion
  3. JRuby
  4. Java
  5. ColdSpring
  6. Squabble
  7. JavaLoader
  8. ColdDoc
  9. 2ddu
  10. AsyncHTTP
  11. OO Analysis and Design
  12. Flex
  13. Railo
  14. XML / XSL
  15. Hibernate
  16. ColdFusion Builder
  17. Fall
  18. Ubuntu
  19. XHTML / CSS
  20. Eclipse
  21. Git
  22. Oracle Database
  23. Usability / UI Design
  24. webDU
  25. cf.Objective()
  26. LWJGL
  27. cf.Objective(ANZ)
  28. Captcha
  29. MAX
  30. Melbourne CFUG
  31. Martial Arts
  32. Random Things
  33. Conduit

Recent Posts

Projects

Recent Comments

07 July 2008 08:25 AM

How do you test CFML against multiple versions of ColdFusion?

'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:

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.



Comments

Posted by Chris Diller on 07 July 2008 09:19 AM

Mark, great article. This happens to be very timely for a project I am working on. Virtualization rocks!

Posted by Adam Haskell on 07 July 2008 06:23 PM

Thats indeed an interesting approach that I am considering taking, more to test different OS/HTTP server configs though. For different versions/types of CFML engines I just use ANT to deploy to 4 different wars I have running under jboss (and glassfish). If I want to deploy it more places I just drop a xyz.properties file into _build/instances. Next time I build a project, away it goes off to the new instance.

Posted by Julian Halliwell on 11 July 2008 05:03 PM

Mark, what OS is your host machine?

Posted by Mark on 12 July 2008 04:25 AM

@Julian
I run Ubuntu as my host. But its virtualisation, so it really doesn't matter.

Posted by Elaine Dunham on 15 July 2008 10:43 AM

Pretty clever to do it this way Mark , thanks for posting the heads up on the easier way to test the same code base between different versions of ColdFusion.

Posted by Jerry Loggins on 16 July 2008 03:07 AM

Thanks for explaining how you test the code base between ColdFusion versions. That's going to come in handy!

Posted by Charlie Arehart on 26 August 2008 07:18 AM

Mark (and others), I appreciate the value of using VMs and I understand that you (Mark) may have found configuring web servers to support multiple CF versions to be perhaps too convoluted compared to just using VMs.

But in case it may help any readers, I wrote about an approach that may be simpler than some:

http://carehart.org/blog/client/index.cfm/2007/8/21/multiple_cf_versions_on_IIS_XP

My focus there is on using virtual directories, in situations where multiple web sites may not be supported (perhaps part of the hassle Mark was alluding to). I also point to other solutions (including mention of using VMs) and mention other entries I've done discussing tools to help with multiple web sites even on versions of Windows that don't seem to support them. Hope any of the above resources may help some.

Posted by Ash on 11 September 2008 05:00 PM

In case anyone is looking to run multiple websites on their windows machine, i have been using the Web Developer Server Suite which works fine with CF 7/8. It's very much like xamp etc. however its got a control center program that gives you links to the vhosts file for apache and the windows hosts file. - www.devside.net

Posted by Ash on 15 September 2008 07:38 AM

Seems that devside.net is selling commercial software now, however the earlier release of the server suite is located at http://sourceforge.net/projects/webdeveloper/

Posted by Ronald on 26 January 2009 03:15 PM

Have you been able to run SQL Server successfully from a guest machine with the actual database on the host machine? I was hoping to have all my development environment in a guest machine with all the source and data on the host, but ran into a problem with the database...

Posted by Mark on 26 January 2009 03:39 PM

@Ronald,

I run my databases on a separate VM from my ColdFusion install, and it works fine.

Sounds like a question for ColdFusion mailing lists!

Add Comment