Re: [ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files
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: 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. > > DevelopmentProduction > > 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. > >
RE: [ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files
One more thought. I don't know if this helps but this is sometimes the way I do it in the application file: 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. > > DevelopmentProduction > > 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 > -
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. > > DevelopmentProduction > > 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
RE: [ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files
What web server are you running? I know some versions of IIS won't let you set up multiple webroots but there are creative ways to get around that so that you can run multiple site roots instead of running it all under the same root. If this way would work for you then here is the way: In the server versions of Windows, you can have multiple versions of web sites installed into IIS and running simultaneously. You can install and run more than one web site within IIS in the professional version of Windows XP or Windows 2000. You just have to pull a trick to modify the IIS metabase to that it is aware of the additional sites. The user interface does not support creating more than one web site. Also, you still will not be able to have more than one site running at the same time. To create the second web site: * Create a command prompt window. * Type "cd \Inetpub\Adminscripts" and press enter. * Find out what the highest numbered site you currently have is. You can do that by typing adsutil.vbs ENUM /P W3SVC If you have never done this process before, the highest numbered site should be 1. * Add one to the highest numbered site. Then run this command: adsutil.vbs COPY W3SVC/1 W3SVC/x Where x is replaced by the new numbered site. For example if you run the enum command and the highest numbered site is 4, then type this: adsutil.vbs COPY W3SVC/1 W3SVC/5 * Run the IIS Manager. You should find a new site has been created. It will be an exact copy of site #1, so you will need to change a few things. Go into the properties for the web site. Change the site name, and the virtual directory for the root of the web site to point to another location on the hard disk. Usually, you will create a new subdirectory under Inetpub and point the virtual directory at that. * To use the site, you must first stop the currently running site, then start the new site. To delete a site, first stop it if it is running (bad things happen if you don't!). Then type: adsutil.vbs DELETE W3SVC/x Where x is the number of the site you want to delete. You can find the number for an existing web site in IIS Manager by enabling logging and examining the logging properties. The web site number is at the bottom of the dialog. -- _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop Sent: Friday, May 25, 2007 3:07 PM To: discussion@acfug.org Subject: [ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files 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. DevelopmentProduction 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 <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 FusionLink <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 -
RE: [ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files
We rely on mappings and virtual directories set up in IIS. Generic multi-site functionality is grouped CFC - mapping to coldfusion CFC directory CustomTags - mapping to custom tag directory _Global - js, css, and shell template files Each site has it's own local content as well Components Css Includes Javascript Templates etc... But the primary mechanism is to set up a config.cfm loaded in Application.cfc/cfm - here we set or override all site dependant stuff Application.cfcpath - usually set to CFC Application.customtagpath Application.globalpath Application.installpath Application.installurl Application.datasource - DB mapping etc... Darin Kohles, Application Developer [EMAIL PROTECTED] Digital Positions, Inc. 2289 Peachtree Road NE Atlanta, GA 30309 404-351-8878 support phone 404-351-2366 main phone 404-351-4055 fax http://www.d-p.com/ -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. > > DevelopmentProduction > > 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
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. > > DevelopmentProduction > > 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 Arc
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. > > DevelopmentProduction > > 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 -
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. DevelopmentProduction 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 -
[ACFUG Discuss] Production vs. Development Directory Structure and Referencing Files
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. DevelopmentProduction 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 - 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 -