I'm a big fan of ColdFusion on Linux. Not that I know half as much about Linux as I do about Windows. Still, we have a good number of Linux servers here at CF Webtools and CF Linux Guru Ryan Stille keeps them all humming a happy tune. I think both platforms have advantages. If you have ever tried to write ColdFusion code that is able to run on both Linux and Windows you will know there a few differences. One difference is case sensitivity for file names.
On windows if you include a file called "myfile.cfm with a cfinclude that is something like <cfinclude template="myFile.cfm"> it will work just fine. Move the same code to Linux and it will generate a "File Not Found" error because of the capital "F" in your include statement. The good news is that once you fix this problem on Linux you can move it back to Windows and it will now work on both platforms. The other common problem is a bit more challenging. It has to do with file paths.
On Windows, file paths usually look like you are accustomed to seeing them on your own windows desktop (Mac and Linux desktop users please sit on your hands - I'm not talking to you right now). The location of your files is usually something like "C:\mywebsite\mydomain\www" - or whatever convention you have chosen. Sometimes files are located elsewhere on the network and there is a UNC path, but I would say that the majority of file operations happen on direct storage with a drive letter. Windows servers typically have only 1 or 2 partitions (a "c:" drive and a "d:" drive for example). Linux servers are quite different.
In Linux there are multiple partitions. Each one starts with a mount point like "/opt" or "/etc" (Linux users please forgive me if I get any of this wrong and be kind with your comments). So the root of your web site on Linux will probably look like "/opt/home/WWW-data/mydomain/www". You will note that 2 things are missing. First, there is no drive letter that is roughly analogous to a partition or a physical disk. Instead there is "/opt" - which looks like a directory except that it comes first. This can be confusing if you come from the windows world because it doesn't seem like a real starting point. Second, you will notice that the slashes are front slashes and not back slashes.
So if your windows code looks something like this:
Here's what you may not know - especially if you have only ever moved code from Windows to Linux and not the other way around. Windows not only doesn't care about case, it doesn't care about slashes either - at least not from within your CF code. On windows the code above produces the following file path:
C:\mywebsite\mydomain\www\images/products/sk1001.jpg
This actually works fine. Windows (or perhaps the JVM or ColdFusion engine is translating) sees either the forward or the backslash as valid path delimiters. This saves a lot of headaches. I have seen code written with a path delimiter as a variable just to compensate for the slashes - as in:
Here are some of the Muse rules of thumb for writing code that works on both platforms.
Of course there are other issues that will be important but these 2 are the most common coding issues that arise. Now I'm sure some of the Linux cabal will want to comment. I bought tar and feathers on rebate this morning at Menards just to save you the trouble. So let fly the arrows of discontent and I'll just sit here huddled under my shield of pragmatism :)