We are just beginning the process of looking for a source code control system. I realize we are behind, but better late than never. None of the members on our team have experience with any systems in their past so I was hoping I could find out some basic things to look for as we begin investigating different tools. Here is a little background on our team:
Our group consists of developers and designers
We work primarily on PC's with one or two on Mac's
Many are not comfortable with command line based systems
The majority of our development is for the web
We develop in ASP.NET, ColdFusion, and PHP
A few we plan on looking into:
SourceGear Vault
Concurrent Versions System
Subversion
Microsoft Visual SourceSafe
PVCS
Rational ClearCase
Team Foundation Server
Git
Tourtoise SVN
Bazaar
Any experiences with any of these would be helpful to hear about.
Do not use Source Safe! It's not only bad for source control it's just bad for the world.
I use Subversion with Tortoise. I love it. Rather easy to get up and running. Branching/Merging can still be a nightmare though.
Visual SVN is good too.
If you havent had a single sourcecontrolsystem so far, I rather doubt you can see the improvements of GIT etc.
Start simple and with a lot of support: use Subversion as Server and Tortoise as Client.
Its a easy setup and easy to use.
Subversion is especially suitable for web development because of the 'differencing' algorithm it uses for binary files. Web development isn't just about code. Binary resources come into play a lot (images, PDFs, etc).
Subversion tracks the differences between files and records those. Contrast that with CVS, which essentially stores another copy of the binary file, and the benefit becomes apparent as your binary resources and check-ins increase.
I use the TortoiseSVN plug-in, which is decent enough for me. As you specifically tag asp .net, you might want to look into VisualSVN, which does a great job in mitigating the biggest problem in version control - a colleague forgetting to add a file to the repository.
I also used Visual Sourcesafe back in the day. Don't know if it's still the same now, but its exclusive checkout per user was a complete nightmare in a team of multiple devs. Constantly had to remind people to check stuff back in or, alternatively, convince a friendly admin to log me in under their credentials whenever someone was out of office.
You may want to take a look at Perforce.
http://www.perforce.com/perforce/products.html
You should go with subversion, or maybe git or mercurial.
It's clearly not worth it for you to buy anything, I think you can remove commercial solutions from your list right away.
Also, you should probably get some 3rd party hosting instead of running your own server.
I work at a client where they use TortoiseSVN as the client and installed VisualSVN (Subversion) as the server component. At one point we had this master plan to use nANT and CruiseControl to keep 3 different environments for a .NET website in sync, but we haven't gotten approval on that yet (shock). So until then, we use our Subversion server to hold all the source code and keep the different environments in sync manually. Its not the best scenario in the world but it gives everyone access to the code and our development group is small enough that its easy enough for everyone to know what is being worked on.
Subversion as a server, and tortoise svn as a client, could fit very well for your requirements, althought I hear that GIT is newer and has a lot of improvement.
I'd second using Tortoise SVN, avoiding SourceSafe and add another to the list:
Perforce - This what was used at one of my former workplaces. It wasn't bad though the merges were painful to do in that it took 1-2 developers a day to get the code merged to move from one environment to other,e.g. dev->test, test->staging.
Tortoise SVN has a lot of built-in windows explorer options that can be used instead of the command line so I rarely use the command line with Subversion.
If you do go with SourceSafe do beware that there is an admin tool to analyze the DB to see that should be run periodically and can be a little annoying as I don't think anyone is supposed to be using SS when the analyser is running. The branching in VSS is kind of weak, especially in contrast to seeing how well things work in SVN.
Another point is to consider if you have a bug-tracking system and want to have an integration between the two.
i personally use git with cygwin. i prefer it over svn because of the pain that svn has caused me in the past with merges. git was designed with making merges painless and it does a very effective job at adhering to that.
if cygwin isn't your cup of tea and you need to have windows explorer integration, please check out the ToroiseGit project. It has the look and feel of ToroiseSVN so it's easy to pickup. you can even run ToroitseGit and TortoiseSVN side by side if you desire.
also TortoiseGit has built in support for SVN repos so you can check out an svn repo and get all the benefits of local branches and what have you.
It true that VSS should not be considered - it is a dead product and just plain bad. However, Team Foundation Server - especially 2010 should be given a look. It not only does source code control but it has a work item tracking system, CI and build server and has some really great tools for testing. For example, it will run automated scripts and record the session in an mpeg movie so that you can actually see what the screen looked like when/if the test failed.
If that's more than what you want, go with SVN.
First advice: Don't use SourceSafe. It's a nightmare. I think even Microsoft developers don't use it internally!
You could go with SVN using TortoiseSVN as a front-end for the people not comfortable with the command line. But you will have to host your own Subversion server or to find an hosting provider for your repositories.
Also, there is SVN plugins for the most used IDE out there.
Another +1 to Subversion. Have used with a variety of languages, including ColdFusion. Tortoise is great for windows, the best graphical clients for Mac are not free, however.
Would also recommend against Rational Clearcase. Their client is kludgy and there aren't near as many plugins for different ide/platforms.
I'm currently working with Rational ClearCase and I cannot complain (at least, 'till now).
Before that we used ChangeMan Dimensions, that's a regular CVS tool with many resources but in my opinion, it makes source control become very burocratic, to say the least: it features the infamous exclusive checkout. I also don't like the design.
ClearCase has a Windows-Explorer look and once you get used to it, it becomes very simple to use. It also has a nice and easy integration with MS Visual Studio.
SourceGear Vault is a great tool. Its interface is similar to VSS, but it doesn't have all the problems.
If you use .net and visual studio or are in a heavily MS environment you may really like TFS. It has very good integration with Visual Studio. It also has lots of other functions like tracking tasks, bugs, etc. and automating builds. It is expensive, especially in the world of SCMs where you can get a lot for free (svn, git). Since you mentioned .net though it may be worth a look.
You need to make a decision as to whether you want to pay for it or have one for free. I know SVN and CVS are free and there are great UI clients and IDE plugins also available for free.
We started off with CVS and then transitioned to SVN a few years ago. The advantages we had were that a. SVN repo was smaller, b. It was accessible over the net through both http and https, c. Had great client UI tools (i use SmartSVN), there are also great plugins for eclipse and intelliJ. d. transitioning from using CVS to SVN was very easy as a user.
I've used QVCS by link text they have fair and much cheaper prices, for different versions.
I've used and tried subversion, and I personally do not like it, but if people like it and use, that's awesome for them.
I say you should find one that has the features you need, and price range that is reasonable, and has a good support system..
The hard part is getting everyone on your team to use it, and use it wisely...
Personally, I really like Subversion and the tortoiseSvn client as many have already noted. One site I found that I really like is http://www.springloops.com. They offer cheap SVN hosting, but they also integrate with BaseCamp which I love for managing projects. If you like Basecamp and also use Svn, its worth a look
Git with GitHub for Windows and/or TortoiseGit.
Related
I've spent some time now developing a web application in php. It has mostly been just for the fun of learning as a side project, but the app now has a few users which I don't want to upset by breaking things as I develop.
At the moment, I have a very rudimentary method for managing the development - I use a text editor (ultraedit) to write the code and use its built in ftp to upload the files to the server. In terms of version control I have 2 domains, and only push files to the "live" domain when they work, but that's it. The domains are hosted on a cPanel shared hosting site which I have some doubts about its ability to handle even minor spikes in traffic. I looked at slicehost yesterday for something more scalable but that looks like a bit of a learning curve from where I am now.
I know I could do better than this, but where to start? I think I need advice on three things
1 - code writing tool
2 - version control / management
3 - scalable hosting
I've deliberately asked these in the same question as I'd like to know if one choice impacts another. Is there a good integrated solution?
Thanks in advance as ever.
Each part of your question has been answered before. The list below lists some of the common tools to use and links to appropriate searches on StackOverflow. There is no all in one package and going into details about these tools in one question is out of scope, so I am afraid you have to do some digging:
SVN, Git or Mercurial
UnitTesting (PHPUnit or SimpleTest)
Continuous Integration
Phing (for deployment)
phpqatools.org
Netbeans or Eclipse (for an IDE)
Disclaimer: list is not meant to be complete and order is not important
There is a lot going on here. I'll give you my two cents though.
I used to use ultra edit. Now I use netbeans, its a fully integrated development environment and it makes my life soooo much easier. Its free too. I can't imagine ever going back to UltraEdit. Also, which brings me to number two, netbeans has SVN and CVS integration
I would use subversion for version control. In my experience it does everything you need for version control. Others use ones like git and mercurial, but I think SVN is widely supported and easy enough to set up. As far as pushing code to the server, i've begun using svn for this too. I first ssh into the server and checkout the code into the public_html directory, and then set up an alias to do svn updates through the command line... its way easier than ftping in my opinion. There are other deployment methods, but i've never used them. see this question:
What is your preferred php deployment strategy?
obviously shared hosting is not going to handle traffic as well as a dedicated server. But there are lots of things you can do to improve performance before moving to a dedicated server. Check out this article: http://developer.yahoo.com/performance/rules.html
It seems that you're after a robust deployment strategy as opposed to a development one. But, correct me if I'm wrong.
In terms of 'code writing tool', and
IDE choice is a subjective
discussion. Feel free to work with
the one you are most comfortable
with, for me this is Netbeans.
As for a deployment strategy, I think it was best summed up in this answer.
Your point about scalable hosting is fairly broad. We will need much better forcasted metrics to give better advice. However, for now, if scalable hosting is a worry then maybe look into some sort of Cloud Hosting.
Have you looked at using wamp/xamp/mamp/lamp for development locally? Uploading via ftp for every change is a pain.
You could do that for local and see that everything works, then push it to your test domain and run through it again and then finally push live.
Might want to look at something like SpringLoops for doing your version control - this has the advantage of doing the deploy and then if it goes pear shaped you can revert it (free account gets 3 deploys a day).
I wouldn't worry about scaleable hosting just now, just focus on the site and the coding, you've only got a few users - wait till it starts becoming a problem before moving (however, I suggest looking into options) but don't try and get all cloud ready - might not ever be a problem.
ps, go with Linode over Slicehost.
I think use Aptana Studio ( http://www.aptana.org ). It is an Eclipse based IDE with all the tools you need integrated in it. It has integrated PHP development tools, GIT or SVN for version control.
I've used shared hosting as well. Once an other site on the same server had DoS atacks and my site became unreachable as well. Otherwise it could work in reasonable speed after some optimization. It served 1000-3000 users per day.
Dedicated servers are much better. Or you can use Amazon web services. I know they are more expensive.
1 - code writing tool
Zend Studio. I would recommend Linux as well if you are going to use linux servers.
2 - version control / management
SVN + phing (if you are going to build serious applications).
3 - scalable hosting
Amazon or RackSpace.
For your editor, just use what you are comfortable and productive with. You most definitely should have version control in place. You never know when you need to rollback a version or two.
I always keep at least 3 versions on the production server. I use symlinks to point the web server at the latest version. If there is a problem, you just need to recreate the symlink to point to an older version.
As for shared hosting, you'd be surprised out how much bandwidth you can get. I have a $10/month shared host that gets about 500K page views a month. Generally, it's not that your shared host can't handle the load, it's that the hosting provider puts too many "shares" on the same server. So it depends on how much resources everyone else on the same server is using. If you are having issues, you can always ask to be moved to a different server.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have been hearing a lot about the advantages of using a version control system and would like to try one. I was doing freelance web development in PHP for the past 2 years, two months back I hired two more programmer to help me. I will be hiring one more person soon. We maintain 4 websites, all of which are my own, which are continuously being edited by one of us. I learned PHP by myself and have never worked in any other firms. Hence I am new to version control, unit testing and all.
Currently, we have development servers on our workstations. When we edit a particular section of a site, we download the code for that particular section (say /news/ or /movies/ or /wallpapers/ ) from the production server to the dev server, makes the changes locally and uploads to the production server (no code review / testing). Because of this, our dev server is always out of date from our prod server. Occasionally, this also create problem when one of us forgets to download the latest copy from prod and overwrites the last change. I know this is very very foolish, but currently our prod server is the only copy that has all the updates and latest changes.
Can anyone please suggest which is the best version control system for me? I am more interested in distributed version control, since we don't have a central backup for all our code. I read about Mercurial and Git and found that Mercurial is used in several large open source projects by Mozilla, Sun, Symbian etc. So which one do you think is better for me? Not only version control, if there are any other package that I can use to make my current setup better, please mention that too :)
It sounds like Git can accomplish your goals quite well. As it's distributed, it's excellent for working locally since you can perform most operations (commit, revert, diff, patch) without connecting to a central server. You can also avoid that ugly moment of someone pushing new code to production while someone else is working on it, and then having the complicated task of merging those two versions of the code together (git provides a useful tool for doing this called rebase).
You noted there's some big projects using Hg (Mercurial), but there's some pretty big ones using Git, like the Linux Kernel, X.org, Android and Debian.
I use git for all my sites: it's lightning fast, efficient, and easy to use.
Edit: If you want to get into using Git, I'd recommend doing some reading before jumping right in. Starting off on the wrong foot can have some terrible implications later on. If you follow an Agile Workflow, you might want to check this out. Here's a website I learned most of my Git know-how from.
Version control is an incredible tool even when you're working alone, and when you are working with someone else it's indispensable. I would recommend using git. It's very fast, has a really great set of available tools, and of course has github.com. Mercurial is basically just as good as git, but it runs a little slower and doesn't have github.
For why to use git, please read http://whygitisbetterthanx.com/
Here's a nice-looking tutorial on getting started with git: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html
You can use SVN, Git, Mercurial.
The biggest challenge is having everyone be disciplined in using version control and not getting lazy.
Definitely Mercurial. Although you can use either Git or SVN, Mercurial is better for two reasons:
Vs Git: Good integration with Windows.
Vs SVN: It's distributed.
If you don't want to run yourself a Mercurial server (which is pretty easy anyway), there are many services available. Kiln + FogBugz is an EXCELLENT combination. There's also CodeBaseHQ (also supports Git and SVN), Bitbucket, and many more.
Before you jump onto it I strongly recommend you read at least Joel Spolsky's tutorial, but I strongly recommend you also read Mercurial: The Definitive Guide.
I am sorry, I had no intention of starting a DVCS holy war. I am going to try Git.
Yes, version control will help. To get started, I see two important issues for you:
hosted or self-managed? Do you want to host this yourself on a server, or want a service to take care of it for you? There are reasons to go either way, but if you're not that into managing the server look for a hosted option.
SVN or Git There are others, but these are the top open source contenders.
Pros and Cons (my opinion):
SVN: Good tutorials and fairly easy to get up-to-speed with. The training requirement is small (I've done a bit of it). SVN works really well with a co-located team, lots of projects, etc. With a limited number of branches (you may not need any), it is solid. There are plenty of integrations with other tools.
Git: Getting started can be a little rougher than with SVN. Some of the docs are good, but lots are geared assume a rather thorough understanding of the internals. Once you get the hang of it, it has great flexibility, but I've seen almost everyone who has started with it really stumble when beginning. Even after working with it for months, people debate the best patterns to use. It's really sweet for 1-person projects (where you want to track history), and for distributed projects like GitHub. I use Git even for small co-located teams, because I enjoy the speed and flexibility.
Given what you say about your team, though, I'd probably recommend trying SVN. There will be better resources to help you get going, and you'll be less likely to get frustrated with it.
Hope this helps.
Our relatively small development team is getting a bit sick of Dreamweaver. The only functionality that we're reliant on is its file check in system. As the team is likely to grow over the next few months we need to address these issues.
Subversion has come to our attention but are unsure if it will suit our requirements.
All we need is to be made aware of whether or not someone is working on a particular file before we request it from the server and to block any overriding of a checked out file.
Any recommendations or advice on general best development practices would be much appreciated.
Thanks in advance.
The way this is generally done with SVN is to not "block" people the way you ask for : on the contrary, SVN allows for several developpers to work on the same file, and the modifications each one made are then "merged".
This merge is mostly automatic ; but when it is "too complex" (like when two developpers modified the same portion of a file), one human being has to resolve the "conflicts", indicating which modifications from which developper has to be kept.
This way of working by merges, instead of locks, seems a bit unusual at first, but once you get it (you'll need to take some time to explain your team about it, and how to use it efficiently, of course), it works really nice : I've used SVN on projects with more than 10 developpers, with absolutly no problem (a few conflicts once in a while, but you solve them and that's it).
On the other side, locking files so only one developper can work on it can block the whole team : what if one file is locked by a guy, and he goes for a coffee-break ? And at this same moment, someone else need to modify the same file to be able to work ?
For more informations about SVN, you can take a look at this online book. It give lots of useful informations :-) (you will probably not need all of that, but a quick look can do no harm ^^ )
As a sidenote, if you are developping in PHP, on a big application, an IDE like Eclipse PDT can help a lot ; and there are plugins, like Subversive, that can be used to integrate SVN access into Eclispe.
There are a number of version control solutions you can look into. Are you sure you want to restrict people from working on similar files? Users can fork the development branch and have their own, when they check in any conflicts will need to be merged together. Some of the version controls come with tools to handle most of the conflicts for you.
It's not always a good idea to lock files that another developer may need to make modifications for. One problem you can run into is if the person with the file checkout is out of the office and their machine is inaccessible.
If that is functionality that you MUST have most of the version controls will allow you to configure your branch to work in such a way.
A few of the version controls out there are: CVS, SVN, Git, SourceSafe, ClearCase
If you decide to use SVN with dreamweaver, there's an extension to integrate some of the commands into the ide: Subweaver
Subversion is ok for our team. We're trying to decide if we should lock files or use the default copy-modify-merge model. Could you give me some examples of when you would have multiple developers on the same file. It sounds a little bizzare as I can't see why it can't be a one man job.
I tried TRAC before and knew how powerful it is
But I'm having lots of difficulties to to put it on an online host, it needs lots of resources and can't put it on a regular paid host
So I wanted to know if there is a TRAC-Like but written with PHP or something, I need it to have SVN, Wiki, Ticket issuing and maybe Forums
Redmine (RoR)
Retrospectiva (RoR)
jotBug (PHP + Zend)
FusionForge (PHP)
If you have Ruby on Rails support, you might take a look at Redmine. It has all of the features that you require. I've recently started using it and have been pretty happy with it. I was never able to find one written in PHP that suited my needs.
Maybe InDefero? It's written in PHP and tries to be a clone of Google code. It has support for git, svn and Mercurial.
I would recommend InDefero too. Clean and fast.
I used to have same issue, but I badly wanted Trac and nothing else. I finally rented a small Windows-based virtual server at €20/month (the linux ones are cheaper) on which I do all my development stuff: Subversion, a test Apache environment, and Trac. It takes some time to set up, but I'm quite happy with it and can recommend it. Also, on standard shared hosting, your problems might not end with Trac: Subversion is a rarity among hosting providers as well. Depending on where you are based, e.g. 1and1 rent cheap virtual servers in europe and the US.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have absolutely no idea about version control. Only that it can be very useful in many ways.
I have found a few related questions but none that start from the absolute beginning.
I am the only developer at my work using Mac OS X and traditionally just been using FTP.
Can anyone help me with version control in relation to PHP projects (does it matter)?
Yes, try it out, it's worth it. And the language you are using doesn't matter. It's working great with PHP for me and it will for you too.
Benefits
If you are the only developer, it is indeed easier to go without version control. However, you will find great benefits to using a version control system. Some of the easiest benefits will be:
Never wondering what is your latest version once you go back to a project (no more myproject090201-archive2-final6.zip)
Never fear to start off some major refactoring, if you make a mistake on your file, you'll just rollback to the latest version
If something stops working in your project and you have the feeling it worked at one point, you can test some of the prior versions easily and look at the difference between the working version and the non-working version to find what broke the code
Additional backup of your current project, and even better if it's not on your machine... of course, additional points for backing up your version control system, we're never too cautious, you don't want to have to restart that month-long project do you?
Choices
As some have said, you have a few choices for your version control system and I guess you'll want a free one to begin. There are a few excellent commercial products but the free ones have nothing to be ashamed of. So here are some very popular free version control systems:
Subversion (also called SVN)
Git
Mercurial
Bazaar
Centralized versus distributed
Subversion has been there for a while and it's one classified as 'centralized'. Meaning everyone will always go fetch the latest version and commit their latest work to one central system, often on another system although it can easily be on your own machine. It's a process easy to understand.
The three others are called 'distributed'. There's a lot of different possible processes as it's a more flexible system and that's why those three newcomers are getting a lot of traction these days in open source projects where a lot of people are interacting with one another. Basically you are working with your own revisions on your own machine, making as many copies as you need and deciding which versions you share with other people on other computers.
The trend definitely seems go towards distributed system but as those systems are more recent, they are still missing the GUI tools that makes it really user friendly to use and you might sometimes find the documentation to be a bit lighter. On the other hand, this all seems to be getting corrected quickly.
In your case, as you are working alone, it probably won't make a big difference, and although you'll hear very good points for centralized and distributed systems, you'll be able to work with one or the other without any problems.
Tools
If you absolutely need a GUI tool for your Mac, I'd then choose SVN to get initiated to source control. There are two very good products for that (commercial):
Versions
Cornerstone
And a few other ones (such as the free svnX) that are becoming a little bit old and unfriendly in my opinion but that might be interesting trying anyway.
If you don't mind not using the GUI tools, with the help of Terminal you'll be able to do all the same things with a few simple command lines with any of the aforementioned systems.
Starting points
In any cases, you'll want some starting points.
For Subversion, your first stop must be their free book, Version Control with Subversion. Take a few hours of your day to go through the chapters, it'll be time well invested. The introduction chapters are a good read even you don't want to use Subversion specifically because it'll get you to understand version control a little bit better.
For a distributed system, I've had fun with Mercurial but it's an easily flammable subject so I'll let you make your own choice there. But if you end up looking at Mercurial, have a look at this blog post, it was an excellent starter for me that'll get you up and running with the basics in a few minutes if you're already a bit accustomed to version control in general. Anyway, drop by Mercurial's homepage and have a look at the Getting Started section of the page.
Conclusion
Give it a go, invest a day trying it out with a few bogus files. Try out renaming files and directory, erasing, moving things around, committing binary files versus text files, resolving conflicts and reverting to older versions to get a hang of it. These are often the first few hurdles you'll encounter when playing with version control and it'll be painless if it's on a non-production project.
In any cases, it's something well-worth learning that'll be helpful with your solo projects as well as if you end up working with other developers at your current job or your next one.
Good luck!
The type of code is irrelevant.
One open-source and popular version control system is Subversion and there is a very good overview/manual here.
I use Git for PHP development.
It's fast, flexible, reliable, clean (CVS and SVN create a lot of hidden folders that I personally don't like).
Its distributed nature allow to work the way you want (with or without a central repository).
You can find more about it here:
Gitmagic
Speed Benchmarks
Moreover, you can get the Eclipse PDT (PHP Plugin) and use Subclibse in the IDE.
Versions is working well for another developer I work with. Additionally, if you are using Textmate the SVN bundle provides pretty much all you need for most parts of the Subversion workflow. I really like it.
The Project Plus plugin takes it a step further by adding small unobtrusive badges to versioned files in the project tree, showing at a glance the state of files in a project.
If you're on a Mac, do yourself a favor and pick up Versions, a beautifully designed (and highly functional) Subversion GUI. You'd do best to learn the terminology and get an idea of how Subversion works using a GUI before you jump to the command line. Once you're able to commit revisions of your code and run updates to get other people's work, then go back and read the red bean book (it really is the best way to learn Subversion in-and-out).
http://versionsapp.com/
use bazaar http://bazaar-vcs.org/
it's very nice and you can start using it in minutes.
Check out other options too - Miscrosoft's TFS (this not only used for source control system but for defect tracking, project management etc etc) , Bazaar, Git are popular ones.
Alex,
Version control (and some will scathe me for this statement) is not a trivial matter, and even very experienced developers get themselves into trouble. The most frequent causes for frustration are limitations of a particular product (Visual Source Safe is a famous one), and members of a team not following the same process, or not understanding the process at all.
This should not stop you from looking into using a source control tool - the opposite is the case. You can only use a tool effectively if you understand what it does and why.
I would recommend that you look into CVS. It has been around for many years, it is relatively simple to install, set up, and use, and while there are GUI clients available for most platforms, learning it from the command line may provide the best access to its features.