chapter31

development in a land far far away…

at the moment

History is not what happened. History is what was written down.

I was looking for some information the other day about line separators across Windows/MAC/Linux etc when I stumbled upon 3 great articles from Christian Cantrell.

Although the articles are quite old they were very informative for me so I thought I’d share them in case others didn’t know this already.

Making Your ColdFusion Applications More Platform Independent (Part I)
Basically about case sensitive filenames which is very important on *nix, but also included the following which I’ve never heard and to be honest would like to test:

Additionally, make sure you use all lowercase when naming your components. ColdFusion MX will automatically lower-case your component names, which you would never notice on Windows, however on Unix, it will become apparent very quickly when you start getting errors that your components do not exist.

Making Your ColdFusion Applications More Platform Independent (Part II)
Shows an automatic way (via Java) to get the current servers file path separator (either a ‘/’ or ‘\’), OS dependant.

Making Your ColdFusion Applications More Platform Independent (Part III)
I’ve been annoyed many times with the whole chr(10)chr(13) on Windows vs chr(10) on a Mac etc, another automated way to get the server OS ‘line separator’ via Java.

Here are the line and file separators as functions which I’ve also added to my Utils.cfc


Related Pages

6 Responses to “Making your web applications platform independant”

  1. Very good stuff! I can remember ages ago I was struggling with this stuff trying to build a new site for Red Storm. I was on Windows - they hosted on Unix. And I was doing it all in Fusebox 1.0 :) Too bad it never saw the light of day :(

    Jim

  2. nice one sharmo, nifty functions!

    david sirr

  3. re: utils.cfc, when you are returnType=void, the is redundant (unless you’ve heard otherwise and care to share? :p )

    david sirr

  4. it filtered out my cfreturn tag in the last post

    david sirr

  5. Yeah putting in <cfreturn> is redundant when you have a “returnType=void” but I like to have it for completeness.

    Obviously whenever the parser hits the “return” it will exit the function so there is no actual benefit to adding it in these scenarios, but when browsing code I find it easier to see the methods exit point.

    Michael Sharman

  6. thanked post

    izolasyon

Leave a Reply