On our latest project I wrote the configuration for the application
and the app loads 2 xml files (the actual application's configuration
data) and the first one is the application instances. So we have a
cluster and we have N number of configurations. The config.cfc
compares the host names in the configuration xml with each and loads
the proper xml file.  Sorta like Dusty's solution but, it doesn't
require any more cfif scenarios.

-Steven

On 5/25/07, Dusty Hale <[EMAIL PROTECTED]> wrote:
One more thought. I don't know if this  helps but this is sometimes the way
I do it in the application file:

<cfif cgi.server_name is "localhost"><!--- dev --->
        <cfparam name="application.webroot" default="/website1/">
<cfelse><!--- live --->
         <cfparam name="application.webroot" default="/htdocs/">
</cfif>

I agree to that you would probably want to use application scope for this.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop
Sent: Friday, May 25, 2007 8:20 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Production vs. Development Directory Structure
and Referencing Files

Thanks Charlie. Actually I do store it in the Application scope. I was
typing fast and not thinking!

   Clarke

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charlie Arehart
Sent: Friday, May 25, 2007 5:35 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Production vs. Development Directory Structure
and Referencing Files

Well, Clarke, I'll just chime in and ask why you'd store that info in the
session scope. It's not unique to each user within an application.  Rather,
it's per application, right? (I know someone may say, "yes, but it needs to
be set correctly for each user", but that's a mistaken assertion, because
the user has to go through the CFAPPLICATION tag (or application.cfc) to get
both their session and application scope. Since all those using THAT
application go through THAT application setup process, there's no need for
it to be unique to each user. Hope that helps.

/charlie
Member, Adobe Community Experts program
www.carehart.org

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop
Sent: Friday, May 25, 2007 5:09 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Production vs. Development Directory Structure
and Referencing Files

This is just the sort of good idea I'm looking for Cameron -- Thanks!

Who else, has a good way?

   Clarke

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cameron
Childress
Sent: Friday, May 25, 2007 3:18 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Production vs. Development Directory Structure
and Referencing Files

It kinda depends on what you are doing with your code and how you are doing
development, but here is what I do:

/approot/   (application root directory)
/approot/wwwroot/   (contains front controller index.cfm, and any
image / js / css files)
/approot/model/   (contains all CFCs)
/approot/views/   (contains all .cfm files)
/approot/config/   (contains framework specific config files)
/approot/docs/   (contains any documentation)
/approot/tags/  (cutsom tags)
...etc...

Now on the development server, the approot is directly inside my IIS root
folder.  This allows me to internally reference CFCs like
"model.path.to.cfc" without making CF mappings for each one.  Pretty much
zero configuration on the mappings in dev.

In production, I map the /approot/wwwroot directory to be the site's root
dir and then create one CF mapping where /approot is mapped to "appname" so
that I can still call components using "model.path.to.cfc".

This way you only have one thing to configure in production, and zero things
to configure in dev.

-Cameron

On 5/25/07, Clarke Bishop <[EMAIL PROTECTED]> wrote:
>
>
> I have continuously struggled with organizing files and setups between
> my production and development environments.
>
> I'm working with a number of sites, and each of them is usually on a
> shared host. On my development machine I have directories for each site.
>
> Development                Production
>
> webroot/Site1/              / (The webroot for this site)
> webroot/Site2/              / (The webroot for this site)
> webroot/Site3/              / (The webroot for this site)
>
> My question is the best way to reference various files with this
situation.
> Say I've got an /include/ directory that needs to be loaded with pages
> in the site's root or in sub-directories. What's the best way to do this.
>
> One way, I've managed this is to setup a session variable,
> SESSION.webroot that gets loaded onAppStart by Application.cfc. Then I
> can just reference the directory as #SESSION.webroot#include/filename.cfm.
>
> It just seems like there ought to be a better way to reference common
> directories like include, images, etc.
>
> What's the best practice?
>
> Thanks,
>
>    Clarke
> -------------------------------------------------------------
> Annual Sponsor - Figleaf Software
>
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists Archive @
> http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink
> -------------------------------------------------------------


--
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]


-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------








-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------








-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






--
Steven Ross
web application & interface developer
http://www.zerium.com
[mobile] 404-488-4364
[fax] 267-482-4364


-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to