CMC
(c) Guido Wesdorp
(not yet) released under terms of the GPL 2.0
DAV Browser

Welcome to CMC, the Content Management Client.

Use the tree on your left hand to browse the server's filesystem, when you click on an item you can edit its properties and (depending on the type of item you clicked) content in this frame.

What is this?

Simply put this is a generic client for content management systems. Instead of having a load of HTML files and scripts of some sort (e.g. CGI) this application consists of a single HTML file and a set of JavaScript files, and handles all the user interface logic on the client side (inside the browser). This produces a better seperation of view and logic and moves some of the overhead of managing a website from the server to the client.

WebDAV

The only thing the server should provide is a basic implementation of a protocol called 'WebDAV' (http://www.webdav.org), a protocol that describes a way for HTTP servers and clients to communicate1. CMC uses this protocol to tell the server things like: 'give me the properties of file X', 'create a new subdir called X in dir Y' and 'set the contents of file X to Y'. WebDAV is a standard that is implemented in a lot of modern webserver applications, this client can be used on all those systems without modification.

Differences

So why is this interesting? Traditional Content Management Systems (CMS) have almost all functionality defined on the server, so a client requests a page and the server generates HTML that is sent to the client. This HTML is a single page, for each particular view new HTML will need to get generated. Not only does this mean a user browsing a website needs to wait for each and every click, often, because the pages are generated, even for views that have already been visited and are unchanged, but also it puts a lot of strain on the server, which needs to generate each page each user views.

Advantages

CMC takes a different approach: the user downloads a small set of static files, and all view-logic happens on the client. This makes that the user is presented with a more dynamic, fluent user-interface, which feels more like an application with dynamic and static parts, and also reliefs the server of all of the view-logic strain. As you probably notice the client is quite fast compared to a traditional CMS client, (if not, try using Mozilla instead of IE! ;) which not only means the user has a better experience, it also proves that the server has only little to do (and obviously for systems with a large number of users that can make a lot of difference)...

1 WeDAV is not really absolutely all the system requires: because browsers don't have the ability to use the 'PUT' method to upload binary files, a small server-side script is required to translate more traditional 'POST' requests to 'PUT'. Also on some systems a small server-side script is required to provide the contents of dynamic scripts: using the 'GET' method on the scripts results in the rendered content, not the actual source code, WebDAV doesn't explicitly deal with that issue.

About CMC

This application is written by Guido Wesdorp in 2004. It is free software, released under terms of the General Public License version 2.0. For more information about the license, see LICENSE.txt in the package.

Where can I download it?

This application can be downloaded, for free, on http://debris.demon.nl, the webserver of the author. Most of the application consists libraries that can be used seperately, as part of another application.

How to reach the author

If you have found a bug, have a question, remark, patch or anything else you want to share with me, you can reach me by email on johnny@debris.demon.nl. Hopefully in the near future there will be a mailinglist or an IRC channel available, for more information see http://debris.demon.nl.

Thanks

Special thanks goes to:

  • My girlfriend for keeping up with me even though I'm always behind my machine
  • Holger Krekel for being one of the most innovative hackers I know
  • Paul Everitt for evangelistic approach and a lot of ideas
  • Infrae for being probably the coolest company I will ever work for

Creating new items

In this tab you can add new items to the server. These items can either be directories or text files (support for binary files is currently in progress).

Adding a directory

To add a directory, choose 'Directory' from the 'Type' select list, enter a name in the 'Name' field and press the 'Create' button.

Adding a text file

To add a text file, choose 'Text document' from the 'Type' pulldown, this will make a textarea appear. In this textarea you can (optionally) enter additional content. Enter a filename in the 'Name' input field, the extension of the name will make the server choose the filetype for the file, so make sure it's correct. After filling the textarea (if you want to), press 'Create' to create the file and save the content to the server.

Create a new sub item
Type: Name:
Content:
File:

Managing properties

This tab allows you to read, add, edit and delete WebDAV properties. Since those properties are XML, this requires some basic knowledge of XML to use.

XML

The properties are displayed as raw XML, so they may potentially be a bit hard to read. If you don't know XML, go to www.w3.org for specifications and references or to www.w3schools.com (commercial website) for a tutorial.

Reading the properties

The properties are displayed as complete XML fragments, just as they appear in a WebDAV response. The name of the root node is the name of the property, the namespace of that node the namespace of the property. A property called 'foo' in namespace 'http://www.bar.com/xml' with a value 'baz' looks something like:

<foo xmlns="http://www.bar.com/xml">baz</foo>
This may look overly complex, but due to the nature of WebDAV (which allows any type of XML to be used inside a property) it is almost impossible to find an easier way to display properties.

Setting properties

When you want to set a property, you will have to deliver something that can go right into a WebDAV request, which means a well-formed piece of XML of which the root node has the same name as the property and the same namespace as the property. The XML can contain any number and type of elements, in any number of namespaces.

Deleting properties

Deleting properties is easy: just check the checkbox before all properties you want to delete and press the 'Delete' button.

Adding new properties

To create a new property, first press the 'New' button. This will create a new field on the bottom of the list of properties, without a name. In that field you can enter a piece of XML just like in the rest of the property fields (the system will get the name and namespace off the root node) and when you're done you can press the 'Save' button.

Edit properties

Edit a text file

This tab allows you to edit the contents of text files. When you're done editing the content of the file, you can press 'Save' to send the content to the server (overwriting any old content). If you want to discard the changes you made, press the 'Reload' button.

Edit text file
Edit the contents of directory
  name filesize creation date  
  n/a n/a  
Rename items
  old name new name  
   
View image