3

I'm an independent web designer/developer. Most of my work is building basic Wordpress websites but I also do a bit of custom development in PHP. I have one bigger client that I do a lot of ongoing custom development for as they are continually trying to improve their website. I am the only web developer working on this site. Lately I've got to thinking that I really need to set up some sort of version control system for working on this website because it's important to be able to easily figure out what has changed and when it was changed in case anything goes wrong on the site and to be able to easily roll back to a previous state. The site is running on an apache server. I have shell access but I'm not really comfortable in that unix/linux command line environment. I do my development on my local Windows PC and FTP it to the site. I have a development website that I work on when developing new features. I FTP my code to the dev server as I work on it, then once I've tested my code and I'm ready to make it live, I FTP it to the live site. What I'm looking for is something that's really simple to set up and will not add much overhead to my existing process. I am not a command line type of guy so I would like a nice gui. I've done a bit of research and feel a bit overwhelemed because it's not just a matter of picking a version control system but also how to set it up for my purpose. I don't know if I should have a system that is just local on my machine and continue using FTP to update the websites or if I should have something more integrated with the server. So what I'm after is not just to pick out a suitible version control solution but also how to set it up for my scenario. i.e. I need a process as well as a version control system. To recap my needs in point form:

  • Main need for version control is so that I can easily determine what has changed and when it has changed
  • Easy to set up for my environment (Development on Windows PC, dev website and live website on LAMP server). Need an easy to follow guide to setup.
  • Easy to use GUI
AidanCurran
  • 2,460
  • 5
  • 20
  • 24
  • Could you update your original post or a comment here with information about what kind of development tools you use for your web development? I'm mainly interested if you're using any kind of IDE and which one exactly. I will give you my answer based on your response. – LightBulb May 17 '12 at 03:39
  • Hi Lightbulb, For my coding I use Homesite (more a text editor than IDE). I know it's an old one long out of fashion but I've been using it a long time and I like it. So my setup is I have a local copy of the web application files, I edit them in Homesite and then FTP them to the server. – AidanCurran May 17 '12 at 03:43

2 Answers2

3

For a designer, or someone who doesn't want to get their hands too dirty, I'd recommend Bazaar (http://bazaar.canonical.com/), hands down. It's easy to use, and has at least one good GUI (called TortiseBZR). It works equally well on Windows and Linux, and (TortiseBZR) even adds functionality to the Window's shell: providing custom icons for modified files and context menus. It was the first VCS I tried, and it was designed with the beginner in mind.

git is awesome and featureful, but it's all mostly command line. svn All I have to say is, welcome to the 20th century. It's outdated, and imo hard to use. hg is mostly like git, but perhaps with a better gui? Haven't tried used it, much.

jpaugh
  • 6,634
  • 4
  • 38
  • 90
  • Thanks for the response jpaugh. I have come across Bazaar in my research and it's claim of 'easy of use' did make it stand out. But I still have no clue of how I would go about setting it up for my particular scenario. Like would I install it on the server or just locally? Can I have it set up so that if I check a file in it goes live on the site? And then how would that work with 2 versions of the site (the dev version and the live version)? Are there any guides online that deal with setting it up for my scenario? – AidanCurran May 17 '12 at 03:29
  • Okay, there are multiple ways to make it work with the server, and there are tutorials for many of them. You can install bzr on just your dev machine, and push to the *dumb* remote server over ssh or ftp. This page should get you started. http://doc.bazaar.canonical.com/bzr-0.11/server.htm – jpaugh May 17 '12 at 03:37
  • I take it back. That link wasn't uber helpful. I guess the best way would be to download it and experiment. http://wiki.bazaar.canonical.com/TortoiseBzr or the user manual might help. – jpaugh May 17 '12 at 03:50
  • I've had a read and I'm trying to get my head around it. Does it mean that I can set up the webroot directory as a repository without having to install anything on the server? Then when I check a file in, it gets pushed to webserver as part of the checking in process? – AidanCurran May 17 '12 at 03:56
  • 1
    Yes, and no. (commit == checkin) When you make a *commit*, you save a copy to your dev repo. Then, when it's ready, you can *push* the latest commit to the server using FTP (or whatever). The server just needs an FTP server, same as always. – jpaugh May 17 '12 at 03:59
  • I also found Bazaar Explorer (http://wiki.bazaar.canonical.com/BzrExplorer), is that just an alternative GUI to Tortoise? – AidanCurran May 17 '12 at 04:03
  • 'you save a copy to your dev repo' - so you mean you would set up the webroot of the dev website as the repository? I think it might might work better if the repository was the final live version, i.e. the live web server. Then I would imagine that the process would be: check out a file, edit it, ftp it to dev to test, commit when done (and file goes live) – AidanCurran May 17 '12 at 04:07
  • I think they work in tandem on Windows. I suppose the thing to do is to learn the concepts from the user manual, then try to translate the examples from commandline to the gui. It shouldn't be hard, though I learned the GUI later on, myself. – jpaugh May 17 '12 at 04:08
  • Bzr is different han that. Bzr uses a decentralized model, meaning every person has a copy of the full repo. They don't have to check in/out, because they each have a private copy. When they get their private copy to a release state, they can then push to the webserver, or to *each other*. It makes bzr different from most commercial vcs', but is more flexible. since you're the only dev, the *only* repo would be your private one; the webserver would just have a copy of the files--and a repo that was never used. – jpaugh May 17 '12 at 04:18
  • This might help clear up the differences: http://doc.bazaar.canonical.com/bzr.2.5/en/user-guide/solo_intro.html – jpaugh May 17 '12 at 04:20
  • Here show's how to do many workflows with bzr. The third is a centralized workflow, something you seem familiar with. What I'm talking about is the first one with the addition of a dumb server that you push to. Sorry for the confusion. http://doc.bazaar.canonical.com/bzr.2.5/en/user-guide/bazaar_workflows.html – jpaugh May 17 '12 at 04:25
  • Thanks for all the responses jpaugh, you've been very helpful. I think I'm just going to have to take the plunge and get stuck in. I would like one more clarification on 'When they get their private copy to a release state, they can then push to the webserver'. I typically have some files that I want to relaese and some files that are not ready for release. Is the model here that you have to release everything at the same time or can you just release individual files? – AidanCurran May 17 '12 at 04:37
  • You can maintain several branches which are not ready yet, each with different sets of unfinished work/files. Then, you can merge them into the "master" branch when they become ready, and then (as a rule) only push it to the server. So yes. You can do what you want, but not the way you said. Also, bzr has an active mailing list, and they'd be happy to help you, better than I can. – jpaugh May 17 '12 at 04:48
0

Based on your requirements and comments, I can recommend the following:

  1. Version control
    • VisualSVN Server (VCS server component, can be installed on your PC, free)
    • TortoiseSVN (Client GUI component, also installed on your PC, free)
  2. Development environment (IDE)
    • NetBeans (Feature-rich and fast IDE, has support for multiple programming languages including HTML, JavaScript and PHP, it's free and open-source)

NetBeans has an integrated support for Git, Mercurial and Subversion so you basically don't have to use any external tools. Instead of using Subversion, you could use Mercurial (TortoiseHG), but for your needs and habits, I think that Subversion is more than enough (and it's simpler to use).

Additional very useful feature that is integrated in NetBeans is that you can automatically upload your project files to a specified web server, and you can have more than one "deployment" configuration (called a Run configuration) per project. You can use (S)FTP or have NetBeans simply copy your project files to another folder (used for local web server).

If you want even more advanced IDE, I can wholeheartedly recommend JetBrains PHPStorm, which is a commercial product, but IMO, it's more than worth it's price.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
LightBulb
  • 964
  • 1
  • 11
  • 27
  • Interesting, I wasn't looking for an IDE but now you have me thinking about it now. I'm just so used to working in Homesite, it's comfortable like an old pair of slippers. Is the version control integrated in NetBeans to the point where it is totally behind the scenes and it's just as easy to use whether you have SVN or Git? I'm asking because the distributed model looks to have the advantage that it is not dependant on one machine, so if my hard drive crashes I'm not screwed. – AidanCurran May 17 '12 at 21:37
  • Integration is such that you do Check-ins/Check-outs directly inside the IDE and you can automate some common and/or repetitive tasks. If you need to protect your repositories from being lost, you need to have at least 2 copies - one working copy on your machine and another located on another machine. It doesn't matter if VCS type is distributed or client-server as long as you have multiple copies.. – LightBulb May 17 '12 at 22:17
  • Thanks. I've installed NetBeans to give it a try and see if I can get my head around it, and get comfortable doing my coding in it. – AidanCurran May 17 '12 at 23:19