Slashdot Mirror


PHP/HTML Development And Version Control?

MadWhtHatter asks: "I work for a Web development company that is looking for a way to version control Web content, both PHP and HTML. I have been unable to find anything that meets my needs, which are: minimal developer retraining, security, it should be able to handle HTML and PHP pages. Unfortunately, most version control systems are designed to work with C++ code, and cannot deal with potentially live Web based code. They also severely impair the developer's ability to work with their favorite tools (Dreamweaver, Editplus). Any suggestions?"

1 of 10 comments (clear)

  1. Re:CVS ? by RGRistroph · · Score: 5

    I would use CVS. I use it myself extensively. As for your "secure" requirement, what I do is I have the cvs repository on a machine which I connect to with ssh. You can set the environment variable "CVS_RSH" equal to "ssh" and it will use ssh to talk to the remote repository.

    As for frontends to it, there exist a number of them. The cvs homepage has a list. I use pcl-cvs, an X/Emacs package, and also the command line.

    I don't understand what you mean by " deal with potentially live Web based code" and "impair the developer's ability to work with their favorite tools (Dreamweaver, Editplus)." It seems that by "live Web based code" you seem to think that a web site will be running right out of the repository, or something. You should have a repository to keep track of versions, and you can check out a particular version from that. Normally, you should check out a copy to a "development server" where you edit and test and debug. The world cannot see or access this, or if they can, it is not the main one on your company's site. Then you check your modified code back into the repository on a special tag or branch. Others check it out to their development servers and validate your work, maybe merging with their own, and you update your copy to get and examine their changes. At somepoint every one agrees that it is stable, and then you do a single checkout to the "production server", the live site.

    So CVS should not have to be integrated with Dreamweaver or Editplus or whatever else GUI nonsense you are crippling yourself with. (Hint: emacs has a variety of html editing modes. Try them out and use one. Plain old Fundamental mode works great too.)

    You mention developer retraining. In about a page you can list the basic commands which will allow each developer to check things in and out, veiw differences (even in ediff, if you use pcl-cvs) and mark versions. Teaching the use of CVS is simple.

    ( I have a simple little text file how-to that I wrote for members of my team when we first started -- it tells how to set things up and check out your first copy and etc. Email me if you want it.)

    But the real problem is not the training associated with CVS at all; the commands are pretty simple and book (the one by Pers Cederqvist that comes with the distribution as a postscript file) is great. The problem is training developers to use configuration management at all. You have to talk with all of them and develop a plan of how to label branches, a naming scheme, etc. Many of them will check out one copy and hack for weeks and then feel frustrated and betrayed because the version has evolved so far that everything is impossible to merge.

    You are going to have those problems no matter what management system you use.

    My advice is to set up and use CVS, and focus on building a culture of development under configuration management among your co-workers. If you have to switch from CVS to something else it won't be that big a deal; getting people to use configuration management at all is the big step.