Noam
I think you may have missed the point: all the custom tag does is set a
variable, request.thisserver, to the name of the box.
Then in the app_server.cfm you do a cfswitch on the value of the variable.
The advantage of this is that there is only _one_ app_server file - you
don't have to keep them all in synch across the dev,test and live boxes when
you change something.
As for a set of variables, IMHO some kind of convention would be handy, in
the same way its handy to have a convention for file names (dsp_this,
qry_that, app_theother etc) - no obligation to use them, but if you do then
its one less think to think about.
Cheers
Bert
> -----Original Message-----
> From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
> Sent: 11 April 2001 12:08
> To: Fusebox
> Subject: RE: Variable definition files
>
>
> Sounds a lot like good old app_server.cfm:
> Way back there were several threads on this need to have different
> environment variables, and the result was to always include a
> file named
> app_server.cfm from outside of the app directory so that this file is
> different on each server and contains any env. specific info,
> also being
> outside the directory it wouldn't get overwritten with updates to the
> application.
> We use it in all applications (both intranet and internet) to
> specify dev,
> test or production environment - and it simplifies life.
>
> About setting a standard IMHO it's redundant as each
> environment set-up is
> quite unique, and all that really matters is the technique of
> separating the
> environment specific info to an external file - not the names
> and types of
> variables.
>
> Just my 0.02,
> Noam
>
> ----------
> From: BORKMAN Lee [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, 11 April 2001 9:04
> To: Fusebox
> Subject: RE: Variable definition files
>
> Thanks Bert,
>
> That sounds like a great idea to me. The problem, of course, is
> deciding on
> a standard(!!!) set of environment variables.
>
> (Can it really be true that CF doesn't have an ENV scope hidden
> away, just
> like CGI scope? Your tag is cool, but it really shouldn't be
> necessary.)
>
> Can anyone suggest a standard set of variables? What
> do we really
> need?
> Document-root, path-delimiter, Customtags directory... anything
> else?
>
> Thanks again,
> LBB
>
>
> -----Original Message-----
> From: Bert Dawson [mailto:[EMAIL PROTECTED]]
>
> I've written a custom tag called whatserveristhis.cfm, which is
> customised
> for each server, that sets request.thisserver to the name of the
> machine
> eg on the dev box it says:
> <cfset request.thisserver = "dev">
>
> Then, in the file that sets server specific variables:
>
> <cf_whatserveristhis>
>
> <CFSWITCH EXPRESSION="#request.thisserver#">
> <CFCASE VALUE="live">
> <CFSET request.server.webroot = "e:\www\myapp\">
> </CFCASE>
> <CFCASE VALUE="test">
> <CFSET request.server.webroot = "d:\cf\myapp\">
> </CFCASE>
> <CFCASE VALUE="dev">
> <CFSET request.server.webroot = "f:\www\myapp\cf\hr">
> </CFCASE>
> <CFCASE VALUE="other">
> <!--- do nought - the vars should be set in
> whatserveristhis.cfm on
> any 'other' servers --->
> </CFCASE>
> <CFDEFAULTCASE>
> <blink><h1>warning warning - server not
> configured</h1></blink>
> <CFABORT>
> </CFDEFAULTCASE>
> </CFSWITCH>
>
> ....
>
>
> IMPORTANT NOTICE:
> This e-mail and any attachment to it is intended only
> to be read or
> used by
> the named addressee. It is confidential and may contain legally
> privileged
> information. No confidentiality or privilege is waived
> or lost by
> any
> mistaken transmission to you. If you receive this
> e-mail in error,
> please
> immediately delete it from your system and notify the
> sender. You
> must not
> disclose, copy or use any part of this e-mail if you are not the
> intended
> recipient. The RTA is not responsible for any unauthorised
> alterations to
> this e-mail or attachment to it.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists