View Sidebar
Getting the Source Code – Various Formats

Getting the Source Code – Various Formats

October 1, 2010 01:04

Most of you developers have noticed that whenever we are searching for a any Open Source Library,  APIs or Components for example Papervision Library,  Google Maps API the library or the codes are available in three formats – Subversion, ZIP, SWC.

I found this topic interesting when i was reading a book on Papervision. So decided to put some light on these three formats using some excerpt from the book.

Also known as SVN, is an open source version control system. It allows developers, or teams of developers, to upload and download current and historical versions of the project they’re working on. If one of the developers makes a change to the project and uploads, or commits it, SVN incorporates the change into a new version of the project. At the same time SVN, being a version control system, saves the previous versions. In other words, you can always retrieve older versions from the server. Many open source projects use SVN because it makes working on the same project by multiple developers less tedious.

So, how do you download the latest version of a project to your computer using SVN? You need an SVN client. This is a software program that you install on your computer. The client will serve as the tool to download the latest revision of the source code. TortoiseSVN (Windows), svnX (Mac OS) are popular clients available for SVN downloads. I am not going into detailing of installing the software. After you have installed the software on your machine create a folder on you r computer to download the libray. Right Click on the folder and select SVN Checkout option in the context menu. Here a window will popup asking for a URL of repository from where the SVN Client will download the library. Provide the URL and the SVN Client will start downloading the source files from the SVN server.

Every now and then you may want to download the latest version of the source code to keep the code up-to-date. Similar to your first checkout, go to the your folder and right-click on it. But this time select SVN Client | Update. The latest revision on the SVN server will now get incorporated in your local working copy. Next, you need to configure the authoring tool of your choice so that you can actually use the code.


The ZIP file contains non-compiled source code. There is one difference with the source code on the SVN server though. Where the SVN server always contains the most recent revision, the ZIP file tends to be more or less outdated. This makes sense, as the SVN source code is the most recent code you’ll ever see as a user. It’s up to the members of a project to continuously release an updated ZIP. For several reasons, this does not always happen, resulting in a ZIP that may be outdated. However, the code in the ZIP file may be better tested and thus more stable compared to the SVN code. Due to the constant changes that are being made to an open source project, the code on the SVN server may contain new features or even bugs, which could result in breaking the code in your project(s) the moment you download a new revision.


Think of an SWC as a library of classes that already have been compiled. If you incorporate the SWC into your project, you have access to all the classes, but you won’t be able to actually see and open them. We’ve just seen that the code in the ZIP file may not always be up-to-date with the code on the SVN server. The same goes for the SWC. But we have also seen that the ZIP file may be more stable than the SVN code and this is also true for the SWC.

Clearly, the process of downloading the SWC or the ZIP is easier than downloading through SVN, as you don’t have to install an SVN client. However, once you’ve set up your SVN client, the updating process is nicely integrated into your system and you will always be able to get the latest revision. For updating the ZIP and SWC just look for the most recent, featured ZIP/SWC file on the list, repeat the download process and replace your current extracted ZIP Code/SWC with the updated extracted ZIP Code/SWC. The choice of which format to use is upto an individual.

If you like the article please share

Comments are closed