Subversion
Subversion is the CVS done right. Now, I know many web developers who sware by FTP and their own voice as a means of controlling their source code. I for one believe that method is by far the easiest, and usually most efficient way to manage source code in a small business. Yes, it is dirty, and yes it can get ugly. The upside is that everyone knows what is going on in the company, and everyone knows what they can edit at any given time. The downside is that one slip up can cost you several hours, if not days of precious development time.
Enter Subversion, a versioning system to handle all things web development. Everything from your PHP/XHTML/Javascript and associated images can be shoved into the repository and ‘versioned’. I’ve only been using the system for a few short days, but I have to say it was probably the smartest move we could have made for the new project I am working on. Not only does using Subversion limit the risk of file overwriting, but it also backs up old files automatically. By ‘versioning’ our files, it gives us the ability to admit design flaws, and go backwards. Subversion also allows multiple people to edit the same file at the same time without the risk of overlapping and losing code using a slick ‘merging’ method which merges changes from each user, checking for conflicts as well.
Now, all that said, it wasn’t easy to get used to. Moving files around in the repository was a tad bit harder than it should have been, but once all the scripts were in their correct folders editing was a breeze. Subversion even makes users keep track of what, and why they edited files. This alone is worth it’s powerset in gold.
There are still some quirks with Subversion and Apache2, but all in all it works like a charm. Best of all, it’s free.
Eclipse
PHP Eclipse is a plugin for Eclipse IDE which allows users of the wonderful, open source IDE, Eclipse (Did I say Eclipse yet?) to code in PHP and enjoy the benefits of automatic syntax checking, as well as function listing (read: Visual Studio-esque completion and suggestions). PHP Eclipse really makes coding in PHP a lot easier by outlining your function definitions, include references, as well as a host of other things. PHP Eclipse has a built in browser for instant ‘on-save’ refreshes of your web applications in real-time on your local Apache install. (Yes, install Apache on the client and use it for testing, locally!) The auto completion features may get on some coder’s nerves, as they seem to complete just about everything for you. I personally turned them all off, it took several clicks to get to the PHP Eclipse preferences, but after I set them up I was back to coding like Notepad was still in style. The big plus here is that Eclipse has everything built in, and if it isn’t there you can grab a plugin that will do it. PHP Eclipse allows web developers to use these features, and tailors them just for us PHP junkies.
Subclipse is a plugin for Eclipse which allows you to use all the features of Subversion right inside your script editor. I cannot express how much time this will save web developers who are so very much in love with Notepad, or some other editor. I can go into PHP Eclipse, select the SVN Repository perspective and check out the trunk right into a project in Eclipse all without having to alt+tab across 3 seperate windows (SVN Client, Explorer, Editor). It sounds really trivial, but the time it takes to do all of those things without having Subclipse is exponential in comparison.
The best part about both of these? They are free, and to add to that, they both work on Windows and OS X. You can easily migrate and synchronize your development team from one OS to the other. So, if I have Johnny working on his iBook, Mike on the Windows XP box, and Timmy working on his Linux terminal they can all use the same environment, with the same SVN system, for free.
Workflow
As you start to use these tools you’ll notice a difference in how you work. No longer must you wait to upload 100 files before you can see what you changed in that tiny include 10 levels under the root directory. No, you can hit refresh and see it in realtime … without screwing up the production server, or tying up anyone else’s work.
- Checkout
- Edit
- Test
- Commit
- Update Production
Bliss.
Subversion Server
Eclipse SDK
PHP Eclipse Plugin
Subclipse Plugin
0 Responses to “Free Source Control and Blissful Workflow”