开发者

Version control recommendation with php/eclipse?

Currently I do all updates manually, meaning when I make changes to the code I manually ftp the files that were changed to the server. Obviously Im playing with fire, so want to start 开发者_开发技巧using a more structured process of releasing updates for my php projects. Im using Windows 7 with Eclipse as my IDE. I have a linux dev box, what version control program would you recommend that I can interact with Eclipse to check out a copy from my dev box? Make changes and commit those changes back to dev, test the code and be able to commit the changes to a production box? (Im assuming that is the correct process?)


Subversion or Git are good choices. They both have plugins that integrate into eclipse and will do what you need.

They do use somewhat different paradigms so choose the one that you are most comfortable with.


I would use a DVCS like git or mercurial with a branching. I use a slight variation of the branching model described here:

http://nvie.com/posts/a-successful-git-branching-model/

Let me describe to you my deployment workflow:

I have 4 environments:

  1. prod: Production - i.e: LIVE

  2. stage: Staging server a.k.a: test environment. This is the final stop before code gets promoted to prod.

  3. int: Integration server

  4. dev: Development

Each developer gets his own local copy of the code and works with the branching model described previously.

Integration environment continuously merges the stuff devs push out (I use a simple commit-hook with a shell script that does this. You can also consider more sophisticated CI tools that could do this). Int will have the latest 'bleeding edge'/'latest and greatest' version of the application. Unit testing is used to make sure no one breaks anything badly.

Just before a release, the codebase is moved to stage. Stuff like functional tests and UA testing is done at this point. If everything looks OK, then I push from stage to prod and the code is then live.

I personally use NetBeans as my IDE - there are plugins that nicely integrates to git/mercurial.

Lastly: a development workflow/deployment strategy is something that is unique to your project/organization. I just (broadly) described mine - all points may or may not apply to you but I hope you now have an idea of how things should ideally work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜