quote Do you run the entire site through this script, or just
the changes? Have you run into problems of long up/
downloads with large sites?
Not really, though my projects are more ‘web applications’ than large sites, really. To be honest, I don’t think I’ve written a site that wasn’t auto-generated by a database since 1999 or so. In the short run it may take less time to create, but in the long run any manually edited site of significant size is going to be a big pain to manage.
But, yeah, the speed issue isn’t a big problem - I’ve got broadband access and I only synch up once in a blue moon anyhow. Compressed, most of my projects go down to 150-250k or so, and take just a few seconds to upload. The tar/gzip/un-gzip/un-tar process takes most of the time, but even that isn’t too bad.
quote How do you make sure that you have an accurate local
copy to develop on (in case of changes made directly to
the web server). A reverse gzip/download/unzip?
I pretty much never make changes directly to the online version - I make changes directly to the code in my local copy and re-run my upload script. If for some reason I’m actively tackling a bug that only shows up in the online version I may open it (the online file) directly in BBEdit and make changes until it works, rather than go through the full synch process.
When I’m done, I just copy and paste the code segment in question over to my dev copy, do a final re-synch, and check it to make sure it’s all good.
I actually have another reason for this system. I have two main projects I’m working on now, both of which share roughly 60% of their code. In order to make it so that I don’t have to maintain two identical copies of stuff, I wrote a little script that combines the files, removes code specific to the project not being currently worked on, and copies it out to a “live” (albeit still local) directory for that project. This is sort of like doing a CVS push-out but with some added logic to dynamically chop away any un-needed code.
The “push to online test site” script copies from that generated version of the site - not the actual directory containing the files I edit (basically, any time I want to test my edits in my local “live” version, I need to run this script - with a command-key equivalent in BBEdit, this takes all of about 4 seconds - the uploading script could add another 30 seconds or so, so it’s usually not worth it).
quote Do you test the site live at a different domain? I’ve
been using test.*.com, before swapping it over to the live
site when needed.
Sub-domains are really good for this sort of thing. I personally have a “dev.mydomain.com” type setup, and use password protection via htaccess to ensure that people don’t see my work in progress before it’s ready. :>
- Jeff @ DreamHost
- DH Discussion Forum Admin