Simplify Website Experiments by Creating Test Folders
While experimenting with new website features, I'm not always consistent with managing the files. I usually duplicate the file being updated, but sometimes I edit the original while other times I modify the duplicate. This normally isn't a problem since most projects are completed relatively quickly. However, there are times when a project is placed on hold. Depending on how long I'm away, it can be difficult determining which file to edit when returning. So let's talk about ways to differentiate the files.
Previously Discussed Options
We've already looked into a couple options for labeling files. "Archiving Old Code after Major Updates" focused on renaming the duplicate file which will be archived once an update is complete. In this technique, the new file name includes a quick summary of what's being updated. If a historical timeline is being added to the "about.php" page, for example, the duplicate file could be named "about (2013-07-15 before historical timeline).php". We would then proceed to update the about.php file. This technique works best for features which are quick to implement.
For longer-term projects, my preference is to modify the duplicate file and preserve the original. In that case, the duplicate is named something like "about (NEW 2013-07 really complicated timeline integration).php". Then I utilize the uploading technique described in "Rename Files on the Fly While Transferring with WinSCP".
Utilize a Test Folder
Both solutions work fairly well, but there are cases which call for something else. If the experiment involves modifying dozens of pages, having all those duplicate files mixed with the live versions can be confusing. That's where a temporary directory is useful.
Basically, we would just re-create the folder structure needed to make the changes. If we're updating some files in the "about" folder and one in the "contact" folder, those folders would be re-created in the new temporary directory.
Once the update is complete, the files just need to be moved back to their corresponding live folders. Of course, you should probably backup the older versions first.
Conclusion
Creating a temporary directory makes it easy to group all the files being modified for a large website update. We could even include a README file with all of the files to describe the purpose of the changes. That way if the project is placed on the back burner, it's easier to jump back into the project. We also aren't clogging our normal website directory with duplicate files which could be confused for the live version.
0 Comments
There are currently no comments.
Leave a Comment