[UPHPU] Source Control Questions
Wade Preston Shearer
lists at wadeshearer.com
Fri Dec 29 07:29:16 MST 2006
> So the company I work for is (finally) hiring some new developers.
> Which is good but it introduces some complications to the workflow -
> which until now has been "ssh in, edit files with vim".
>
> Here's a wish list of things I'd like, can someone point me to the
> optimal solution?
First, I would recommend that you use a version control system.
Subversion and CVS are the two most popular. This allows all of the
developers to check out the code base into their own development
environments ("sandbox"), make their changes and additions and then
check them back in. I would then push to a staging server for final
testing, from which you can verify that code is ready to be pushed to
your production servers.
> * Each developer should have their own development environment that's
> independent of everything else.
You can have each developer set up their own environment on their own
workstation, but I find that that is more trouble then it's worth.
Why have your programmers waste time setting up and maintaining a
server? That's ITs job. I prefer having a development box(es) where
the environment is already set up for them (ie: Apache configured
correctly, database already set up and pre-populated, modules and
other things already installed, etc). Each developer can have their
own virtual host here. There are a lot of benefits to this, such as
being able to view other developers sandboxes and access your own
from anywhere (without requiring VPN).
> * The development environment should play nice with using
> $_SERVER['DOCUMENT_ROOT'] to include files. I'm thinking of giving
> each dev their own vhost for this.
Good plan. I would also set up a conf file for your applications.
Then the developer can set custom settings and then exclude that file
from the check in.
> * I'd like the ability to review code before it gets committed, to
> prevent obvious stupidities from getting into production code
Good plan. I am not aware of any automated services to facilitate
this, but I find peer review to generally be sufficient for
preventing obvious mistakes.
> * I don't want to look at diffs when reviewing code - I'd like to see
> the old file and the new file side by side with differences
> highlighted.
>
> * Production code should be separate from our code repository - I
> should check out the code into our production server the same way
> people check out code to work on it locally.
This is as simple as you have requested. You can do this with both
SVN and CVS.
> * I want to be able to keep some files "hidden" from some developers -
> specifically the files that contain our DB password info, credit card
> gateway info, etc. They would need to stay in the live code and/or
> the repository, but not get checked out along with everything else
> when someone grabs the code.
I am fairly certain that you can restrict access to files in the
repository.
> * Expanding upon that, it'd be nice if I could just give someone
> access to certain parts of the code and not others.
This is also easy with a versioning control system. The code can
exist in various branches and other chunks that you can specify who
has access to.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20061229/64bc20c0/smime.bin
More information about the UPHPU
mailing list