Hey Luis et al,
I have a large codebase where, on dev, all the view files are in a
shared directory called "SharedCodebase". This directory lives right
off the webroot, i.e. inetpub\wwwroot\SharedCodebase. This same
codebase houses the display code and a bunch of other stuff (not
CFCs... they're managed separately). This shared codebase is used by a
dozen or so other applications (we have a big ole' flagship product,
and each client gets a new 'version' of the application, but we try
like hell to keep each client application using the code from the
shared codebase).
so i've got wwwroot\ClientA and wwwroot\ClientB and so forth.
Currently this is a waaaaay old fusebox app. We set a variable in
application.cfc called "application.codebase", and that variable is
set to either /SharedCodebase/ on dev or /ClientA/SharedCodebase in
all other environments. Our index files, then, reference this
variable in all of the cfincludes.
So in our index file for each client app, we'll have stuff like this:
<cfinclude template="#application.codebase#/documents/dsp/dsp_someFile.cfm">
This way, in dev, all client apps are always pointing at the shared codebase.
However, when we move the apps to test, staging, and production, we
actually Copy the SharedCodebase directory INSIDE of the application.
and then in those environments, "application.codebase" no longer
points to wwwroot\SharedCodebase but instead to
wwwroot\ClientA\SharedCodebase.
In this manner we can keep clients using shared code on dev and do a
good job of keeping the apps in sync, but when we deploy to different
environments we ensure that we don't affect other applications on the
same machines.
The nice thing about this is that no code at all has to change in our
index files.... application.baseroot simply points to a new location
on the file system.
However, as I get started with coldbox, I'm not seeing an easy way to
achieve the same thing. In essence, what I'd like to do is say:
"hey, coldbox, on DEV, go to wwwrooot\SharedCodebase for your view
files. But in other environments, go to
wwwroot\ClientA\SharedCodebase".
Is this possible?
Thanks!
Marc