views:

111

answers:

2

I've just inherited a CF app from a customer who uses a shared CF hosting provider. I'd like to introduce better processes including the ability to stage app changes that I make for their review. (In the past, they would upload changes and cross their fingers.)

Their app lives in a folder under the webroot. Let's call it "/app". I'd like to create a sibling directory named "/appstaging" where I would publish the latest code. The obstacle is that the hosting provider lets you set paths for custom tags and mappings but not per CF app. The existing settings all point into the /app directory so if I need to make changes to tags, CFCs, etc., I can't test these without affecting the live app. What I want is CF to let me set per-app tag paths and mappings. From what I've read, CF8 lets me do this but the customer is using CF7 (I'm pushing for them to upgrade asap). In the meantime, is there anyway to workaround this or does a smooth way of staging changes have to wait?

(I am currently experimenting with ways to detect which app I am based on using GetCurrentTemplatePath() in application.cfm. The idea is that any code that refers to other files using mappings would use a different mapping. I haven't done enough work there though to know if this will all work out.)

Any ideas or input are welcome. I should point out that the app and its dev env is not very "modern." There are no frameworks involved and no things like ant used for build/deployment. The customer's budget is extremely limited so I'm not looking to convert the app whole-sale but I do need to find cheap ways to get some process in there to keep things sane.

+6  A: 

This is a serious, but wacky, suggestion: use a second hosted account.

Write up a cost-benefit analysis of having live and staging servers, and compare that to the cost of a second hosted account. The second account doesn't need massive data allowances, etc, and ought not cost as much as the live account.

Additionally, calcuate the cost of revising the code base to allow live and staging on the one account and compare that to the cost of a second hosting account.

Remember that you wont need the second account once your real upgrade is complete.

Antony
Seconding this. It shouldnt cost very much and to all intents and purposes provides an independent staging server.
Jack Ryan
Agreed. Why waste time programming when everything is solved with a second hosting account? Even if client is on a tight budget, a second cheap hosting account should be cheaper than developing a work around.
Eddie
+1  A: 

I expect you'll need to do something like defining the custom tag paths in a config file that gets loaded into the application scope. But that'll require some serious code refitting.

Al Everett
Although the 2nd hosted account mentioned elsewhere is a great idea, I went with something like this instead mainly because the upgrade to CF8 will happen soon and so the customer doesn't want to bother with logistics of a 2nd account. But also because as a side effect of loading CFCs with explicit paths (the app predated CFCs) and other tweaks I made along the way (config files, etc.), I'm able to have a staging directory side-by-side with the live app. There still is overlap with the custom tags dir but I'm minimizing the use of those in the app so that it's rarely if ever an issue.
DaveBurns