sTEFANs Subversion Web Contol (SWC)
[ class tree: Swc ] [ index: Swc ] [ all elements ]

SVN Web Control Description

1. Purpose and Introduction

Subversion Web Control (SWC) allows to control a Webspace for Web-Projects versioned with subversion (SVN). Imagine, Harry and Sally (yes, the two developers from SVN-Book) are working on a web-based project, let's say a new homepage for Bob. They are using subversion to manage their source code. They have also a nice environment, including an Apache 2 web-server running PHP. They are using PHPeclipse and Subclipse - Plugins for Eclipse.
With this environment they can develop their goal fast and easily: Both Harry and Sally got their own virtual servers pointing to their workspaces. So they can test their code independently within a browser. But how do they know, whether the parts they create fit together? How can they make a release or a delivery without checking everything in and update the workspace? Especially if they have to keep things checked out because they are not ready yet? How can Harry be sure that Sally committed everything and didn't forget something?
The solution is easy: They simply create a common webspace, on which nobody is working but that contains a certain view of the repository. Fine, but it is not convenient to maintain this webspace. In one case they even could use the svn-shell because they had no direct access to the server. What to do?

These problems belongs to the past, because now they are using SWC which is made exactly for this purpose: To manage and maintain a common webspace within a browser.

2. What can SWC do for you?

Basically the same as for Harry and Sally. SWC is easy to use and appears on top of your webpage. This means that you have your project and repository information in one view.
Furthermore, you will be able to
  • Initially check-out the project into the webspace.
  • See basic information such as current repository revision and webspace revision.
  • See immediately whether the webspace is up to date.
  • Update the webspace with HEAD - the latest or youngest - revision.
  • Switch to tags or branches, which is very useful to reproduce scenarios on older versions.
  • Dig into the Repository either via SVN Web Access or even via WebSVN.
  • Run predefined SVN commands such as Info, Log, Cleanup and see the result of the operation.
  • Run other SVN commands like on the command line. (For administrators who worry about this feature: It can be denied).
  • Set the desired frame size in that your web-pages should fit.
  • Switch between different projects from a single URL.
Some functions for a more convenient use of SWC, such as some settings or a compact view that doesn't need much space. are available. The project page can be opened in a separate window, independently from SWC.
SWC can even be adapted to your needs: It is fully CSS-styled and it is easily possible to match your design.
It is also possible to translate any text used within SWC, basically comes with English and German. But you can add your own language if you want. SWC then uses the language that fits best with your browser settings.

3. Installation

SWC is entirely written in PHP and tested with PHP 5.0.4. I'm not aware of using very special PHP functions, so it might work also with older versions. All you need to run it, is a web server that supports PHP, and PHP, of course. And yes, SVN and a browser ;-). The web server should have file access to SVN.
The directory structure of the web-server I am using for development looks like the following. Maybe this example is helpful to set-up your development environment as well.
and so on.
There is a virtual server (domains) pointing to "workspace-for-harry" and another pointing to "workspace-for-sally". Harry and Sally are using these servers for their private development. A third server points to "swc" which is used to access any (configured) projects just by selecting a different project within SWC.
And there are additional servers for each project pointing to e.g. "project1". These servers are used to access the project webspace via SWC. The code for each project webspace is located within "project-webspace" of the according project. The reason is to keep things separated because the "projectX" directory contains SWC configuration for the project.
SWC comes with two simple test projects that are structured in a similar way and can be used to play around and check, whether your copy of SWC is working.
All you need to do now is to configure your projects as described in the next section.

4. Confguration

Configuration of a project which is accessed via "swc" server above is done within the "./config" directory of SWC. Create your config class that is derived from SwcConfig located in "./inc/" and apply your settings within this configuration. Details about the configuration class can be found within SWC documentation. In the second step you need to instantiate your class in SwcConfigFactory located in "./config/". Again, the configuration for the sample projects and the available documentation should be helpful when you look for details. If everything is configured properly, you should be able to access the project via the server pointing to "swc".
If you want to configure a dedicated project server for SWC, you need to do the same thing as described above. Create an SwcConfig for your project but put it to the "projectX" directory. Additionally you need to create an SwcConfigFactory that instantiates your config class and implement a certain function that returns your factory. Everything, SwcConfig, SwcConfigFactory and the factory access function can reside within the same file. Again, details can be found with the SWC documentation and example projects. For convenient access to your project, put an "index.html" (or something similar) into your "projectX" directory. This html file contains a frameset with only one frame pointing to SWC. As argument for SWC, add the location of your config file. That way, SWC knows where to find your project. Please be aware, that any SWC related paths need to be applied from SWC directory "swc" point of view, not form your project directory. Such a configuration can be found in the root directory of SWC delivery.
Well, that's all. Have fun (or check the documentation ;-)!

5. License

SWC is protected via GNU Lesser General Public License.

This software was created by sTEFANs POWERED BY

Documentation generated on Sun, 26 Mar 2006 21:47:06 +0200 by phpDocumentor 1.3.0RC4